Ian Hickson, maintainer of the HTML5 specification, argues that the real purpose of DRM is to give content providers leverage over device manufacturers. Although this is true for some applications of DRM, in many cases the purpose is to lock customers to particular devices and services, and to raise barriers to entry against new devices and services.He is undoubtedly correct that the real purpose of DRM is not its avowed one of preventing piracy. Much of what is available in in a DRM restricted format from one source is available in an unrestricted format elsewhere: most obviously music sold online with DRM is available on CD (which does not allow DRM) or even as a download without DRM elsewhere, and is almost always broadcast (including in digital formats) without DRM. Once one copy is tripped of DRM it can be pirated without limit. DRM is also applied to books which are so intrinsically easy to distribute in pirated form that DRM is futile.
So what is the real purpose? It varies, but the key in most cases is to control consumers. Consider the the Amazon Kindle and the DRM Amazon applies to books. Again, the content is available without DRM through the Kindle Cloud Reader: although, as far as I have been able to find out it is in any case fairly simple to remove the DRM from Kindle ebooks, so no one bothers the more awkward process of intercepting the DRM free content in Cloud Reader.
The real purpose of Kindle DRM is to make it expensive to switch to to another device. A consumer who has a collection of books and wants to switch to another ebook reader must purchase new copies of every single book they want to keep. This ties consumers down, maintaining market share against existing competitors and making it very difficult for a new entrant into the market to gain share at all. The tech savvy minority will strip the DRM, but for the majority of customers switching will simply not be an option.
Of course many services have exceptions to DRM: much of the music Apple sells is now DRM free, and Amazon Kindle software can be used to read Kindle books on an Android tablet (and the Cloud Reader to read on any platform), but the remainder is still a very high barrier to switching. Furthermore, none of these are guaranteed to remain available: they may turn out to be a way of leading customers into lock-in, and may be withdrawn once their purpose has been sufficiently served. In Apples case its customers are locked in in multiple ways, not just DRM, so selling some content without DRM does not loosen the lock very much.
The bottom line is that DRM is a way of limiting competition; a way of routing around free market competition.