The problem is when foo and bar are used in material aimed at beginning programmers who are still developing that instinct and who haven’t yet got that bit set.
https://en.wikipedia.org/wiki/Foobar
"FoobarNot to be confused with FUBAR or Foobar2000."
It's linked from FUBAR but not under "disambiguation" but "See also".
> It is possible that foobar is a playful allusion to the World War II-era military slang FUBAR (Fucked Up Beyond All Recognition).
https://en.wikipedia.org/wiki/Foobar
Which is certainly how I've always understood it.
(It is useful to illustrate syntax, though!)
The Jargon File, though largely historical and obsolete, is a good place to start:
https://news.ycombinator.com/item?id=33747944
https://catb.org/jargon/html/F/foo.html
It was probably paired with "bar" because of FUBAR though.
My dad referred to the figure known as the "impossible trident" ( https://en.m.wikipedia.org/wiki/Impossible_trident ) as a "foobar". It was used as a warning to engineering students to check their technical drawings.