It comes ultimately from mathematics: the summation notation traditionally uses i for the first index, j for the second, and so on. Example (from http://en.wikipedia.org/wiki/Summation):
It’s also used that way for collections of things, like if you have a bunch of variables x1, x2, … xn, then an arbitrary one will be known as xi.
As for why it’s that way, I imagine SLaks is correct and it’s because I is the first letter in Index.