Why it is done this way
The workup comes first, because the diet already failed
People who cannot lose weight are usually not eating in secret. They are up against something measurable.
Insulin resistance, an undertreated thyroid, sex hormones that shifted in the forties, and several very common prescriptions all make weight loss substantially harder. Frequently more than one is in play.
Telling that person to eat less and move more describes what they have already tried.