I'm not so sure they didn't.... there's no DRM on their OS (no activation, no keys, no problem re-installing it on more than one Mac). Compare that to MS who practically accuse you of piracy before you run your first update.
The DRM they do have (in the Mac App store, iOS apps at least) is so low-key that most people don't even know it's there. I can buy an app once and install it on any and all iOS devices, again and again, with no concern at all. If it's a Mac app, I can install it on up to 5 Macs at once. Neither of these is likely to encourage me to go out and break the DRM, so it's serving its purpose of preventing me 'handing on' a copy to a friend.
The same with Movies, TV & Music - you can play them all back on all your devices, stream them to your friends' apple devices, everything short of hand over a copy. You can even burn a CD of your music with no DRM at all, if you like. I agree that it's more intrusive here, but because the limitations are reasonable (don't give it away, but you can do anything reasonable with it yourself) there's a much lower incentive to break the DRM.
Of course, this only holds true if you stay in the Apple ecosystem, but since most of their customers do - I bet most of them don't even know what DRM is, or why it's bad. I know I'm talking to Slashdot here, but remember we're not the typical users.
So in short, it's working for them, because of the decisions they made - customer comes first (as long as you stay in the walled garden) as opposed to trying to prevent each and every 'lost sale'.