There is also the problem of backfeeding, but this is more theoretical - even if you know to limit your power use, your neighbors won't and so your generator will trip its own breaker. Linemen are taught to either treat power lines like they are live, or to short them to ground - it can happen they don't do this and you kill a linemen, but still not as big a worry as it is made out.
They make generator "inlets" that sidestep all these problems when used correctly. Most common I've seen is a block so you can't have the inlet and the main breaker both on at once.
Skip to about 10 minutes into this video: https://practical.engineering/blog/2022/12/5/what-is-a-black...
Furthermore, the danger of backfeeding is if you do it in a power outage and you start to power your neighbors' houses. It'll overload your generator and create a hazardous situation for anyone working on the wires. (This is why you're supposed to install either a generator switch or interlock. I have one that only allows me to energize when my main breaker is turned off.)
If this weren't done, there would be risk of electricution to anyone working on wiring in the house or on the utility distribution network.