Why Moses Could Not Enter the Promised Land

The Holy Bible is recognized as a source for the philosophy that requires a. punishment to fit the crime, but some of God's punishments are hard to understand, at first, not appearing to be equitable but extreme. Why is that?