They also occur for no reason at all. Most often erections are caused by sexual stimulation. Stimulation is a physical response to a stimulus. When someone steps on your toe, the stimulation you feel is pain and there is nothing you can do about that. It does not mean that he is aroused.
Arousal is a mental and emotional thing.
You can be sitting and fantasizing without any outside stimulation and become aroused. It can certainly be caused by seeing or hearing something that turns you on. But that outside stimulus must turn you on in order to arouse you. You must have a pre-existing mental thing for great legs in order for a great pair of legs to arouse you. If you don't have that leg thing, you could watch Tina Turner all day without one sexual feeling.