From NPR:
Getting a song on the pop charts takes big money. Def Jam started paying for Rihanna's recent single, 'Man Down,' more than a year ago. In March of 2010, the label held a writing camp in L.A. to create the songs for Rihanna's album, 'Loud.' At a writing camp, a record label hires the best music writers in the country and drops them into the nicest recording studios in town for about two weeks. It's a temporary version of the old music-industry hit factories, where writers and producers cranked out pop songs.
Read more here.