It’s easy to wrongly think about your muscles like your bones – you can see the start and end of bones more easily – it’s at the point of the joint.
But the muscles are like leverage pulleys and so they must go over joints or attach to points either side of a joint – this gives the structure stability. Look in an anatomy book to find the beginning and end of muscles.
Often muscles of the leg go over 2 joints like the ankle and knee.
The muscles of the inner thigh go from the femur to the pubic bone keeping the hip joint in place.
Which muscles are over tightened? And so causing undue pressure on a joint?