Yes but 90% of it isnt against pirates. People complain that DRM only stops legal owners. And that is true. Because most of the control is purposely against "casual copying". The good-buddy sharing of games. As long as it stops that then its done most of the hopes of it.
Like any control or law or protection, anyone can say "it doesnt stop anything". But if you think of its goal as making it as hard as possible for as many as possible for as long as possible then it makes more sense. And its to make it clear where the line is drawn and when a person will be breaking the law. Same as a fence, or a lock on the door. Doesnt really STOP anything but I wouldnt stop using them.

The big battle of writers of DRM is against writers of backup softwares.