To be fair, Game of Thrones is an extremely tangled web. The King (Robert) was supposedly the father to Joffrey and Tommen. In reality, both were the sons of Cersei (Robert’s wife) and her brother, Jaime. While the truth about Joffrey and Tommen’s true father isn’t exactly a well-kept secret, publicly, Cersei and Jaime have denied the claim.
George R.R. Martin often bases plot points around things that actually happened in history. A lot of the Starks vs. the Lannisters are (admittedly somewhat loosely) based around the War of the Roses, for example. But if Cersei’s family tree is based on any historical figures, I’m not aware of it.
Regardless, putting Jaime on the throne would give legitimacy to the rumors that Jaime boinked his sister. Even though that’s true in this case, it’s not something that Cersei and Jaime want to admit to publicly. There’s no legal issue of succession here with Jaime, at least not until the major parties involved fess up to who has been boinking who.
Also, singing the Disney song “I’m my own grandpa” in relation to the Lannisters is probably not a wise thing to do in Westeros, at least not in territory that the Lannisters control.
There are also people who have a much clearer claim to the throne legally than Cersei, which muddies the waters quite a bit, legally. Cersei wasn’t given the throne because everyone thought she was next in line. She took the throne. If you disagree with her, feel free to take it up with the Mountain.
I think the theory has been mostly discredited by now, but for a while a lot of folks had the idea that something similar happened with Nefertiti in Egypt. The theory, as I understand it, was that Nefertiti took control as regent when her husband and son died, then ended up making herself a Pharaoh (women generally weren’t Pharaohs). After her death (or murder), the people went out of their way to erase her name from history. While I think the theory is no longer believed by many Egyptologists, George R.R. Martin may have borrowed from it for his books.