This has to be one of the falsest, most overused expressions of all time.
I recall Karl Wallenda, the famous tightrope artist, fell off the high wire and died at the age of 73. People said "At least he died doing what he loved to do". As I recall, Wallenda loved walking ON the tightrope - he HATED falling off.
John Denver died when his plane crashed. People talked about how he loved to fly and said "At least he died doing what he loved to do". Maybe he loved crashing into the ground at 300MPH -- but he could only do it once!
Former US Vice President Nelson Rockefeller died in the middle of an orgasm with his secretary. Not ONE person said "At least he died doing what he loved to do". But I'll bet he did!