The NFL now allows the two networks to get a number of games from the other conference each season. ThE NFL makes the final decision, but the networks can state their preferences. This is one of them.
EDIT: here is a good explanation from a few years ago from a FOX affiliate in Wisconsin:
https://fox11online.com/sports/packers-and-nfl/an-explanation-of-the-guidelines-for-nfl-tv-coverage
"In general, Fox airs NFC games, CBS airs AFC games. For non-prime-time games between teams in different conferences, the network of the visiting team gets the rights (in most cases). That's why CBS has the Oakland at Packers game. However, starting four years ago, it became easier to shift games between Fox & CBS on Sundays, regardless of conference affiliation. This "cross flex" tool may be used to even out the number of games aired on each network, or to get a high-interest game more distribution - even if it's on the 'wrong' network. This year, that tool is being used, such that Fox is airing the Denver at Green Bay game, and CBS is airing the Packers at Chargers game."
----------------------------------------------------------------------------------------------------------------