Although it is not said why it was sinful for Hezekiah to show the king of Babylon his riches, the sin was probably because of his pride. It can be viewed as bragging to another king about how rich and powerful he was without giving proper credit to Yahweh. Because of this sin, Yahweh punished him. (See: [[rc://en/tw/dict/bible/kt/sin]] and [[rc://en/ta/man/translate/figs-explicit]])
At this time, Babylon was not very powerful, but was little more than a city. In a short time, however, Babylon became a very powerful nation and conquered Assyria.