Here's why:
* Hydrogen (H) has a +1 charge when it forms a compound.
* Iodine (I) has a -1 charge when it forms a compound.
Since the charges balance out, the simplest formula for the compound is HI.