Well obviously if those two are the exact same guys they will choose the fit guy.
However, girls would rather sleep with Leonardo dicaprio out of shape (who has a beautiful face, good genetics, and is naturally tall at 6'0) than they would sleep with a naturally bad genetics, balding, 5'5 guy who is in great shape.
So really, physical fitness is just one of many traits girls look for.
And sadly, it really isn't the end all be all. Girls don't care about physical fitness as much as you may think. It's more about height, size in terms of bone structure itself, and your facial good looks
WITH THAT SAID, I have gotten the most girls when I was consistently hitting the gym.
What the gym DOES give you, is HIGHER TESTOSTERONE LEVELS, HIGHER ENERGY LEVELS, AND MORE CONFIDENCE AND ALPHA MALE CHARACTER TRAITS.
When you are ALPHA MALE, girls are wayyyy more attracted to you. Even more than the muscles themselves.
Also: ITS A NUMBERS GAME. Once you have worked out a month consistently 3-4 days a week HARD at the gym, you start getting elevated energy levels. This means you can do more clubbing at night, have more energy after work to hit up girls on Tinder (best dating site ever for guys to get hookups), and other places to meet girls. You also visibly have more energy, charisma and vitality in person on your dates, leading to more sex.