Because it is often a condition of getting a visa. It's not so much the invitation itself, but that the inviter has to guarantee certain things about the person's visit, for example that they will leave when their visa runs out, or that the inviter will be financially supporting their visitor....