From what I read, the causes of Frozen Shoulder can be hard to pin down, but in my case it started with a rotator cuff injury.
The next step is pain, leading to you deliberately or unconsciously limiting movement. Something also triggers inflammation which adds to the pain, and discourages movement even more.
Restricting movement leads to loss of muscle tone but importantly, also encourages the joint to dry up. There can be a substantial loss of lubricating fluid in the joint leading to.....further inflammation and more pain. So of course you respond by further limiting movement, and down you spiral.
The moral here? Don't give into the temptation to lock your arm by your side. This doesn't mean exercising to excess. The rule of thumb is that you should not feel pain for more than about 15-30 minutes after exercise. Too much, or too vigorous exercise can cause make the problem worse so it can be a fine line. More on exercises to come.