It's not a hard-and-fast switch; the McDonnell 119/220 was a prototype for a 4-engine bizjet with underwing podded J34's, a small straight turbojet. I'm sure they were vulnerable to FOD & erosive wear.
Sometimes there's an aesthetic reason; a bizjet w/aft engines can pull up to the GA terminal, shut down #1 and discharge pax with #2 still running, then taxi away to park without restarting #1. (Saves another operating cycle on an engine too, a quantifiable $$$ amount)
And an MD80 flew some years ago with GE36 Unducted Fans on the tail - way too big for underwing mounting.