This wasn't in the books. It was added to the film by the Director, in collaboration with the book's author Suzanne Collins & Johanna's actress Jena Malone. In an interview:
"This happens often in scripts," said Lawrence. "That interview sequence was basically done as a montage. The original script had these one-line little things that felt like they were in the middle of an interview. So I went to Suzanne Collins and said, 'Suzanne, I think you and I have to create a little addendum. Because actors can't just do one line that's in the middle of an interview. What we have to do is create a full section of an interview, so there needs to be a real question from Caesar Flickerman, and a full answer from each of these tributes, that sort of matches their point of view against the Capitol, but also shares a little facet of character.' And it was actually Suzanne's idea — or she and I together, actually — to give Johanna this 'fuck you punk' attitude."
As it happened, Malone had a similar idea. "I showed up on set that day, and I was like, 'Francis, I think I just gotta riff in there. I think I just gotta get up there and I just gotta lay one on him,'" she said. "He's like, 'This is great. Look, I also wrote you this [dialogue in question]. And I was like, 'I love you. Are you kidding me? This is perfect.' So I used that and made Johanna take it and eat it and chew it up and spit it out."
And then the studio balked because of PG-13 requirements.
Everything went exactly as planned — until Lionsgate execs saw the day's footage. Apparently, Lawrence had not informed the studio that he was inserting two F-bombs into their PG-13 film; the MPAA generally only allows one before slapping a film with an R rating. So they rang up producer Nina Jacobson — the only time the studio did so during production — and asked her, Um, what are you doing?
"And Nina said, 'No, no, no, they're going to bleep it out,'" said Lawrence with a smile. "'Don't worry. We're not going to mess with the rating. Don't worry about that.'… It got the biggest laughs on set when [Malone] just went, you know, crazy. We just said this is from the Capitol, and the Capitol's airing it, and the Capitol would have bleeped it all out."
The in universe reason is that the Capitol is as bass ackwards about cursing as Modern day United States whose ruins it grew out of. I bet the Capitol FCC is just as aggressive about fining.
It was a delicious moment for Malone as an actor, but she also appreciated how it further drilled into the story's larger themes of media manipulation — and how uncomfortably close the Capitol can be to our own world. After all,Catching Fire is filled with people being slaughtered (bloodlessly) — not to mention Johanna's elevator strip tease. Yet saying "fuck" out loud is verboten.
"It's such an easy way in to understanding the mentality of the Capitol without having to do too much nudge nudge wink wink," said Malone. "Particularly in the society that we live in, there's like 60,000 different porn sites, but people get thrown off of Instagram because they show an artistic nude. It's just so weird the way that we censor ourselves, and that there's actually no balance between the two, so I think it's a really great way for a generation to see that as like, 'Wow, even at this level, they're still being censored.'"
It becomes thematic, in that Panem is essentially an allegory for modern day entertainment dissonance. It's meta in that a film that revolves around the bloody death and torture and slavery of of children is okay for 13 year olds, but not a pair of contextually appropriate, non-sexual fleeting fucks, itself has an in-universe government that requires children to be brutally murdered but is not okay with cursing on TV.