"It" not only refers to things but also to those whose gender is not yet determined or is unkown or of it has no gender at all. Sometimes they call baby as "it" when it's still in the womb since the gender is still unknown. Dunno why you think "it" only refers to things.
Also singular they is not used as a pronoun, it's more used as a possesive term (not sure if possesive, i forgot the nuances of grammar a long time ago) like somebody left their shoes at the storage
Edit: just checked google, they actually did add singular they as a pronoun, my bad