why does milk of magnesia have an expiration date?
Many countries require anything marketed as edible to have an expiry date. You can speculate about what might spoil your Magnesia (see comments above), but likely it will be good four or fourty times as long as indicated. 

Of course the lid might not be perfectly tight, and it could dry up or get contaminated by bacteria, but this can happen anytime. And certainly after some time it will separate into clear water and a thick suspension of magnesia particles and you'll have to shake or stir it very thoroughly before consummation.

Anyway these expiry dates are 99% baloney. Very few things really get bad before you see the mould grow on them.

Fun fact and (german) exemption to that rule: After six months at the latest, the taste of beer (the non-pasteurised stuff) starts to deteriorate. Yet, according to the date on the bottle, you have 12 more weeks to drink the remainder of that crate with increasing disgust before it "expires".