This because they contended against Allah and His Messenger: If any contend against Allah and His Messenger, Allah is strict in punishment.
That is because they opposed Allah and His Messenger. And whoever opposes Allah and His Messenger - indeed, Allah is severe in penalty.