Almost every track posted to sites like these are released by the artists themselves (or by their labels). Many hip-hop blogs (including the two I linked) will not post songs if they weren't legitimately authorized by the artists (e.g. if a track was stolen and leaked on the web).
Something you won't ever see are full albums. These sites aren't designed to replace album sales, they actually encourage them. They will only link to individual songs or freely released mixtapes.
(Also, you'll note that a lot of the music posted is from unsigned artists. A lot of newer rappers actually rose to prominence after having their music posted on these sites.)
There are many, many sites that willingly infringe on copyright and the government has good reason for shutting down. This was not one of them.
PS. For more information on how music gets released to these blogs, read this excellent piece, also by Techdirt:
http://www.techdirt.com/articles/20101222/02112912376/more-b...