I'd add that in addition to the mental aspect is pure muscle memory.
If you build the muscle memory through practice, then the ability to make them in a game becomes completely mental in the ability to focus and call on that muscle memory to shoot the ball the exact same every time.