The Prophet (SAW) is simply indicating the importance of praying in Jama'ah and how angry he became at those who did not pray in Jama'ah without any excuse.
A longer narration of the same hadith:
"By Him in Whose Hand my soul is I was about to order for collecting firewood (fuel) and then order someone to pronounce the Adhan for the prayer and then order someone to lead the prayer then I would go from behind and burn the houses of men who did not present themselves for the (compulsory congregational) prayer.
By Him, in Whose Hands my soul is, if anyone of them had known that he would get a bone covered with good meat or two (small) pieces of meat present in between two ribs, he would have turned up for the `Isha' prayer.' (Sahih al-Bukhari)
The Prophet (SAW) is extremely angry at those people because they care more about the world than the hereafter. If there was any worldly benefit in attending the congregation, those people would have attended. But, the benefit of the hereafter isn't enough to motivate them.
Important to note that burning their houses wasn't actually done, but the Prophet (SAW) used a figure of speech. Something along the lines of "X was so bad, I was about to do Y" where you didn't actually do Y but the sentence portrays how bad X was.