There is something to this that is more about social behaviors and filters than 'interested because someone else is interested' as your comment implies.
Dating someone is a sign that the person is able to handle a relationship. Itbisn't a reliable sign, but it is kind of like popularity being contagious. When someone is visibly getting along with people they are more approachable. Same concept.
The other thing is that people in relationships are generally not pursuing new relationships and that is less intimidating for a lot of people. I always had more attention from strangers when I wasn't looking for a relationship whether or not I was in one at the time. Being in a relationship guaranteed I was in that mindset since I prefer monogamy.
So it isn't that they want what others have, but that people are generally more approachable and give off better vibes when in a relationship. Not always of course, but it is a trend.