Muscles move you.
Muscle tissue is designed to lengthen and shorten as it moves the joint by pulling on the bone it attaches to. There are 3 types of common exercises performed to strengthen a muscle; eccentric, concentric, and isometric. Eccentric and concentric require motion at a joint to either lengthen or shorten respectively, while isometric is the activation of the muscle without active range of motion at the joint. To explain this further, there is always going to be motion at the joint, even if there is no physiologic motion. Physiologic motion is defined as “flexion” or “extension” while joint motion is passive movement within the joint capsule.
So, to answer the question, joint motion is necessary to strengthen but physiologic motion is not required (although it is certainly preferred).