I really like how they both connected to real world history. It just adds a nice bit of immersion to the game, and I actually enjoyed learning about those time periods (More so assassins creed since I knew nothing about those time periods).
In answer to how it's possible, it'll be down to lots of research on the developers part. I do have to respect them for putting time into getting this stuff as accurate as possible, and also being able to adjust parts to include their games. Much better than any CoD game (Or equivalent) that has you running in killing anything foreign lol