Why are there so few historical RPGs being made though?
You can't underestimate how dumb / out-of-touch the average publishing executive is. The people who get to decide what games get made don't actually play games these days. Instead they are just business suits, who base their decisions purely on market research and previous success.
Now it's true that some historical games have been fairly successful, e.g. Age of Empires series, Kingdom Come: Deliverance, Civilization, etc. But their success pales in comparison to genres like Fantasy and Sci-fi. So from that perspective, the suits just don't find history that attractive, you can read up on this from Dan Vavra's descriptions when he was pitching Kingdom Come to various publishers. They basically said to him "love the game, but we just don't think there is demand for it".
They think the average gamer is much more dazzled by fireballs and elves and guns. And they are probably right to some degree.