It's perfectly legal to use songs as ringtones for personal use, thanks to a license enacted by Congress in the early 20th century. This was done to protect against a potential musical monopoly, as there were fears that giant music publishers could buy the rights to almost every song and then ban anyone from making piano rolls of their own performances. You don't have the automatic right to perform the musical work at a public performance or to sell recordings for commercial use, such as background music or for use in a film or other public performance. However, you can record a song to sell to ordinary people for private use.
The Recording Industry Association of America (RIAA) opposed this idea, as it would mean that they would have to negotiate separately with music publishers the recording rights to a song and the right to use part of it as a ringtone. In contrast, several music publishers and composers opposed the idea, saying that the ringtones were not “versions of existing songs”.