Bangladesh told MTV News the song originated a long time before Rihanna recorded it. " 'Cockiness,' it's layers of things I had sampled for a long time, never really messed with it too much," he said. "I was in L.A., and I had just pulled it out, chopped it up, made it a beat. My artist Candice Pillay, my other writers, Dem Jointz, they wrote the song."
"It wasn't 'Cockiness' at first, it was something else," he added. "They had the 'I love it' part. ... [They] came up with that part first, and that wasn't even on that track: It was just an idea. I was going to make a whole new beat out of it, what they wrote to it that day, it wasn't really all the way done. A couple days later, they revisited it and came up with the 'Cockiness.'"
Given its sexual innuendo and swagger, there was one person who immediately came to mind to record the track. "I was like, 'That's dope. That's Rihanna all day,' " Bangladesh said. "They sent the song back, and I finished producing it. I put the 'I love it' on it that they had already had. She loved it, and that's what it was."