He didn't say he was giving up now. He said he wanted to carry on until Wimbledon.
And indeed had mentioned the possibility of the surgery, and expressed doubt about coming back from that. It did rather take away from the attempt of the Aus Open to say farewell.
As for the idea that he should think of his family, I'm sure he does. He seems to give every impression of caring very deeply for his family. Tennis is not just a game for him. It's his job, an obvious passion, and a huge part of his life, and his family's life.
Whatever happens, it's been an extraordinary career, played at a very high level for over 10 years. We are somewhat spoiled in the quality of those at the top, and while it is difficult to compare eras, one significant figure for Murray in the Open Era is that he has beaten the 10th most top ten opponents. That's better than Sampras, or Edberg, or Borg. And of the top four in that stat You have three players, Federer, Djokovic, and Nadal who he has played consistently. (Note if Nadal beats 3 more top ten players, it will be the top 3).
We are in a very different era to others though, and there is a current stat, that I suspect might fall in this Aus Open, that no one currently playing, who is under 30 has won a set in a Slam final.
And somewhat related to that, there was a tall changing of the guard when John Isner, 6'10', 33, lost to fellow American Reilly Opelka, 6'11', 21. That said the other 6' 11' professional is Ivo Karlovic, who has made it into the 2nd round at the age of 39 and 10 months.