The reason you should shut the toilet lid is to prevent bacteria from getting into the air when you flush the toilet which is also called toilet plumes.
Shutting the toilet seat lid before you flush helps prevent the bacteria and germs from spraying into the air when you flush the toilet.
You can stop toilet plumes by closing the toilet lid although if there's a gap in the toilet lid some small amounts of toilet plumes may occur but it reduces the amount of bacteria coming out of the toilet.
Toilet plumes are also known as the bacteria that spreads in the air when you flush a toilet.
A toilet plume is the dispersal of microscopic sewage particles & water vapor as a result of flushing a toilet.
Day to day use of a toilet by healthy individuals is considered to be of a lower health risk.
Flushing your toilet or a toilet does release bacteria into the air through tiny droplets and even though you cannot see the bacteria being released it still is being released which is why you should close the toilet seat lid if it has one before flushing.