You have asked a very good question indeed.
Here we see one of examples of the "old accusative" which is formed as the inanimate accusative despite the noun being animate. To my knowledge, in old Russian, it was a normal thing: "Сел на конь и поехал в огонь". In modern language it would be impossible: "на коня" should be used instead, but this is from archaic poetry.

However, there are traces of that "old accusative" in the modern language. One of the examples is "пойти/идти/ходить в гости".
Other usages are limited by the construction "идти/пойти в + Accusative Plural" where the noun is a group of people by their profession or occupation, and the meaning is "to become one of them". This usage is somewhat old, but you can find it in the literature quite often:

пойти в солдаты - to become a soldier, to join the army;
пойти в лётчики - to train to become a pilot;
пойти в космонавты, пойти в повара и т.д.

Actually, "пойти/идти/ходить в гости" is probably the only set expression of this sort where the verb is used in its direct meaning (physical motion). In all other expressions of the similar structure the verb is used figuratively (more like "to join the group").

There was a famous Soviet poem by Mayakovsky "Кем быть?" which extensively uses this form:
Владимир Маяковский — Кем быть?