In dreams, sexuality, in the sense of feeling desire for someone else, is a basic, primeval urge for closeness and union.
It is as though we are searching for a part of ourselves that we have lost and the other character in the dream represents the closest we can get to that part.
If we were a fully integrated human being, we would have no need for sex with someone else, but most of us have an inherent desire to be united with everything that is not part of our own ego.
Sexual activity is either the highest expression of love and spirituality between two people or, if purely physically based, is entirely selfish.
It would be up to us and our understanding of ourselves to determine which it is.