Chemically and biologically speaking, it is because of the testosterone. But it might be interesting to explore why we evolved that way.
When humans were hunters and gatherers, much of the childcare was left to the women, as babies need to be breast fed. Babies make a lot of noise, which would scare away prey if they were trying to hunt. So women often did the gathering while the men hunted. Strength helps a lot for hunting, so the men that could build strength easier tended to eat better and survive, while the men who could not build muscle couldn’t provide and died.
Later on, when humans organized into nomadic tribes, they often went to war over territory. Again, the women were left to care for children, while the men went out and fought and killed each other. The weaker men tended to die quicker.
Only in recent times did it stop mattering how strong men are. We can survive without building muscle now.
Latest Answers