When you stop to think about it, it’s rather amazing that two of the most common Spanish verbs, ser “to be” and ir “to go,” are identical in the past tense. Fui can mean either “I was” or “I went,” fuiste can mean either “you were” or “you went,” and so on. Those of us who have spoken Spanish for years take this fact for granted, but it’s rather a shock when new students encounter it for the first time. They always wonder how Spanish speakers deal with this ambiguity: “How can they tell which one is which?” As a linguist I’m also interested in the historical side of the question: since the purpose of language is to convey meaning, how did such an ambiguous situation evolve?
In practice, of course, context invariably prevents confusion. Juan Carlos fue el primer rey de España después de Franco can only mean that Juan Carlos was the first king of Spain after Franco. Likewise, Juan Carlos fue a Barcelona can only mean that he went to Barcelona. The reverse interpretations just don’t make sense.
In general, people are skilled at using context to fill in gaps in meaning—this is how we’re able to communicate effectively despite speech errors, static phone lines, and other complications. The fue/fue example underscores the importance of this capability even in untroubled speech.
As for the historical side, the facts of the merger are clear. Classical Latin had distinct past tense conjugations for esse “to be” and īre “to go”. But, as Tom Lathrop explains in his The Evolution of Spanish (2003), just as a modern English speaker can say “I’ve been to New York” instead of “I’ve gone to New York” (or a modern Spanish speaker can say Estuve en Barcelona instead of Fui a Barcelona), a Latin speaker could swap esse for īre to produce sentences like In Mediam fui sæpius “I was [=went] to Media more often.” This substitution makes sense because going and being are closely related: if I went to Media, it follows that I was in Media, and vice versa.
Spanish then expanded this usage so that the past tense of esse took over that of īre more generally, not just when talking about a specific destination. This takeover was abetted by the fact that the past tense forms of esse (fuī, fuístī, etc.), with their initial f consonant, were more robust than those of īre (iī, īstī, etc.), which eroded phonetically over time.