The floor doesn't keep rats out. Not having things rats want in the space keeps rats out

They are unlikely to come up through an earthen floor that is properly set on the earth. Rats are not really burrowers. They are more likely to get in through a hole for plumbing, or around a window or door. A good foundation and a properly lain floor will make the floor rat proof.