That's not only because snakes use the opening but also because pets capture snakes and bring them inside through pet doors.
Roof vents and plumbing vent stacks often have large openings that allow climbing snakes, like rat snakes, to enter a building.
These openings can be covered with hardware cloth.