Okay, I needed to speak up because I hate this misconception.
COPYING YOUR OWN MUSIC FROM YOUR OWN TABLET TO YOUR OWN COMPUTER IS NOT ILLEGAL.
Sorry for the all caps but this misinformation keeps spreading and I'm trying to stop it. The reason Apple doesn't let you copy music directly from your iPad or iPhone to your Mac isn't because it's illegal. It's because they want you to buy your music on iTunes.
This is the same reason Apple doesn't let you download an MP3 file from a website directly into the Music app on the phone. It has nothing to do with legality, it has everything to do with making you use iTunes to do that. If Apple let you do this, you could use any of the other music stores on the web directly on your phone (Amazon, etc.) and Apple doesn't want that!
Making users use a PC or Mac with iTunes to put their own music on iOS devices makes it just inconvenient enough that people may just log into the iTunes Store and buy what they want. Hell, I've done this myself. I felt dirty afterwards.
So yeah, not illegal. Just unprofitable for Apple.