There's mathoverflow.stackexchange and math.stackexchange. There seem to be a number of sites that are have both an "overflow" site and a "exchange" name as well. Eh?
The name "Stack Overflow" was chosen by community voting in 2008, beating out suggestions like privatevoid.com and algorithmical.com (full poll results here). I couldn't tell you why those 1,721 people voted for it, but the name stuck, and over eight years later, it's still around.
MathOverflow has a different history. It was originally an independent site, launched in late 2009 but inspired by Stack Overflow (hence the name "MathOverflow"). It then joined Stack Exchange in 2013.
The names for the rest of the Stack Exchange network - and the name "Stack Exchange" - have been covered in Where do the names of the Stack Overflow trilogy sites come from? (for the Trilogy) and Where did the name "Stack Exchange" come from?. "Stack Exchange" was short for "The Stack Overflow Knowledge Exchange" (no "Platform"), in the beginning. That's quite the mouthful.
There are other non-Trilogy sites without names of the form "[X] Stack Exchange". Many of them are discussed in Why do some Stack Exchange sites have their own domain names?. Quite a few came from Stack Exchange 1.0 sites and outside sites - which have their own long, complicated histories.