Why does decreasing the volume of a gas cause nonideal behavior?

One of the tenets of the Kinetic Molecular Theory is that individual molecules occupy no volume. In a large volume with little pressure there are so few individual molecules in contrast to the size of the vessel that they are far apart and their individual volumes doesn't matter that much. However, as the size of the container decreases the molecules are forced closer and closer together At low volumes and high pressure the molecules CAN get in the way of each other and their volumes become more noticeable.