Why does the checksum have to change when quitting out of a single player game though? How does that prevent cheating?
No the reason for the checksum changing is purely a way to avoid people getting OOS from not starting from a fresh load of the game.
I've seen a lot of people ranting about this, but tbh I think Paradox should be cut a bit of slack here, as people look at the multiplayer and stuff and compare it to other games, they don't seem to appreciate that this genre is exactly the hardest in some respects to do multiplayer for. Games like Call of Duty and whatnot are, paradoxically, simpler in some regards since the pieces involved are much simpler, and OOS is not really an issue beyond hit registration issues and rubber banding as there is little 'random' element beyond smoke particles and such.
When you load the game, you see all the 'creating history' etc things, taking a while to load up? Well that is preparing the data to be just so, a perfect blank slate with the data exactly correct for a multiplayer game. It's all loaded into memory, and (I imagine) pretty sizeable when it's in memory.
You're one of two players intending to play a multiplayer match. But before that you start a single player game in 1085 as a Duchy in Russia. It then has to change all the data in memory, stepping through the history files and iteratively marrying / killing / changing every character, awarding every title of every kingdom, duchy, county and holding as per the history file, initializing all the game systems, opinions, and everything else.
This all changes massive swaths of the internal game data.
Then you immediately, without even playing a single day, go back to the main menu. What do you have now? They then have to reset the game to its original state. Imagine the other player also does this, playing in 1337 as the King of England. If one single variable isn't reset to its original state, somewhere in the depths of all that history, all the game systems, all the flags and switches, and then you start a multiplayer game in 1066. Both multiplayer games are given the same seed so when random dice rolls occur they get the same result, but are otherwise playing completely independently from eachother, simply transmitting back and forth the players commands to keep both worlds in sync.
A nightmare job in itself, if you think about it considering lag, if one player clicks to assassinate someone on their end, causing a dice roll, at the exact same moment someone on the other end clicks to assassinate someone, then on person A's machine person A would get the dice roll of 40, and on person B's pc person B would get dice roll of 40. The next generated dice roll might be 80, which from person A's perspective person B would get, and from B's perspective A would get.
Thing is there is no such thing as 'real' time when communicating between games. You can see what time you got the message, and when it was sent, but the PC from which it was sent could have a different time set to the PC its sending it to. There's no possible way to determine for sure whether a local event happened before or after a remote event, all you can do is predict from ping times and determine a kind of assumed differential time between the PCs to work out, in hindsight, that player A's assassination attempt came before person B's, so person A should get the 40 and person B should get the 80. But this is complete guesswork, in *all* multiplayer games. Random is a huge huge pain in the backside.
So back to the starting a new multiplayer game without quitting. All it takes is just that one variable buried in the depths of memory to have a different value to the other player, due to already playing a game and not having the memory state totally reset to how it is on load, and it will have a 'butterfly flaps its wings' effect that ends up causing a different event to play out on one PC to another. Both PCs have no real way to know this is happening, and so OOS.
It's a bug, and they've stated on the mp forum they are fixing it, but it could be some time because this kind of thing is a living hell to pin down, but in the meantime this changing checksum thing is great as it means those not aware of this can play the game without guaranteed month 1 OOSs, which are far more annoying than needing to restart to get into a game.