Exactly for the same reason as the feeling of hunger caused by the contemplation of eating delicious food by other people. A person mentally imagines himself on the spot to consumers.
... Or watch your own sex in the mirror. Human sight is an important and most informative source of information, and therefore excitation of emotions. That is why, observing sexual actions, a person experiences a stronger arousal than when other senses are turned on. Even if a person is very sensitive to tactile sensations, considers himself to be one hundred percent kinesthetic, visual impressions add stronger erotic experiences to his sensations.
This is called empathy.
It manifests itself not only in the ability to feel someone else's grief. Because of her, we yawn when we see other yawns, because of her we cry in sad films (or just worry), because of her we get aroused when we see other people having sex.
Aesthetic visual pleasure. Elementary! Most of this applies to men. And I don’t think you are attracted by the picture when dirty bums make love. As a rule - filmed sex, more often, art, perfectly matched light, makeup, tone in a man and a fit woman. And they are played for the camera, and not for their pleasure, that is, every man, watching such films, thinks: "Poor man, he is so uncomfortable, the camera moves and interferes, and he is in such a forced position." And another thing - a man tries on a hero on himself, and a woman too. Or memories float.