Let us say we have a container of 100L capacity and a gas inside it is kept at STP.
ok, let us think about this and let us assume ideal gas for this whole topic.
We got a container with 100 L volume at 0°C and at 1bar. This means there has to be 100/22.4 mole of gas in there, so roughly 4.5 mole of gas, not just one.
According to the law the gas should occupy only 22.4L of volume but shouldn't the gas occupy the entire volume of the container in which it is kept(100L in this case) as gases expand without limit?
If we put one mole of gas into a 100 L container it will expand to the whole volme but that means that temperature and/or pressure have to change and then it is not STP any more! If we put 1 mole of gas into a 100 L container and we keep the temperatur at 0°C the pressure would go down to 0.224 bar.