To jump, or push yourself off the ground, you need to apply some kind of force on the ground, or in other words push off of it.
Our muscles work by squishing and stretching. When they squish they pull on bones and apply a force. Tense your biceps... they themselves squish and then pull your forearms, and the forearms move.
When you bend your knees, you squish and stretch certain muscles. As you push yourself of the ground certain muscles squish, certain stretch. The squishing ones pull your tibia/shin and/or feet bones etc... and they transfer the force to the ground. And you jump off.
You could jump by just squishing your calf muscles and pulling your feet into a "straightened" pose and push yourself of the ground that way, but that's not a lot of force, so you'd jump an inch high. However, if you squish your frontal thigh muscles, pull your shin/lower leg into a straightened position from a previously bent-knee pose, that's a lot of power and force being transferred to the ground. And you jump high.
Due to a thing called "principle of the lever" the longer the body part you move to push off, the less force you'll need to move. In simplified terms, the fulcrum here is the point of contact with the ground. Therefore, it helps to bend the knees and not just ankles, even aside from the fact most thighs are stronger than most calf muscles.
Btw, the simplest way to illustrate the principle of the lever is any door. Try pushing open a door by pushing it with your finger near the handle, at that end of the door. Easy. Now try doing it by pushing near the hinge. Yeah, good luck with that.