I've heard this sentiment phrased much better:
"There are three things that mostly determine how well your life goes: what you're doing, who you're with, and where you are. If you can get two of the three right, you're ahead of 90% of the human race."
Sometimes there are tradeoffs between the three, sometimes not, but it's really, really hard to get all three to line up together.