It is obligatory to be content with what has been destined and decreed by Allah. Whatever has happened or will ever happen takes place by Divine decree and fate appointed by Allah but that does not mean any compulsion or coercion, for Divine decree in this case means Divine knowledge and announcement. What is meant is that Allah knows everything as it is and makes an announcement about it.
Whatever Allah does, that is the most proper, otherwise it will follow that He does things in vain also, which He does not, for He says:
Do you think that We have created you in vain? 1