octopi arises because people have learned Latin 2nd declension masculine nouns, by accident or repetition, where pluralizing (nominative case) turns the -us to -i.
It's a pattern matching phenomenon.
It would be less weird if there were not spelling irregularities, since the -pus is meant to be foot (like pes, pedes...in Latin, or pos, podes,... in Greek).
Basically, the spelling irregularity triggers a sensible pattern match, which happens to of course not honor the spelling irregularity.
And then nerds like me write too much about such, but i had years of Latin (and a little Greek) for something!