What's the purpose of padding with Maxpooling?
The whole purpose of pooling layers is to reduce the spatial dimensions (height and width). Therefore, padding is not used to prevent a spatial size reduction like it is often for convolutional layers. Instead padding might be required to process inputs with a shape that does not perfectly fit kernel size and stride of the pooling layer. 

This is an example where it perfectly fits and your pooling layer does not require any padding:


Side note: The output dimensions are calculated using the usual formula of $O=\frac{I-K+2P}{S}+1$ with $I$ as input size, $K$ as kernel size, $P$ as padding and $S$ as stride. 

However, lets take another example where it does not fit as nicely:



Here you need padding since your input size is not an integer multiple of your kernel size. Therefore, you need to add padding on one side in order make it work. 

So padding="same" in Keras does not mean the spatial dimensions do not change. It just means that padding is added as required to make up for overlaps when the input size and kernel size do not perfectly fit. 

Also this question for a discussion what the difference between same and valid padding is for pooling layers.