This result is consistent with the atomic picture of a gas since decreasing (increasing) the volume of the gas increases (decreases) the number of molecules colliding with the side and hence increases (decreases) the pressure.