Why shouldn't I congratulate someone for their body? It's not a given to have a good functioning, well-toned, healthy and strong body musculature. It requires determination and willpower.
Nothing wrong with a physical compliment, especially if it's something they chose or worked on. But it's nice to know that others notice that you're more than just a good looking body as well.
A friend of mine had some unexpected health issues, and lost a ton of weight. They looked good before and after, but they were really uncomfortable when people would "compliment" them on their "weight loss". It wasn't something that they had tried to do, and it was a reminder of the health problems that they'd been struggling with.
I think complimenting someone's body AFTER they've told you they've been working on it (or if it's obvious they've been working on it, say with muscle gain) is totally fine, but their experience really changed my mind on those types of compliments.
Sometimes something that you'd think was 100% a compliment can have other effects. My friend wasn't necessarily upset at the people who thought they were complementing them, but the best compliments are for who a person is and how they make the world around them better.
Love it, I'm saving this! Sometimes it's easier to compliment what we see so it's nice to be reminded to think a little harder about how we want to uplift people