There is no purpose for a robot having a sex or gender, and they would have no souls either (no such thing as a soul to begin with). Sex and gender being attached to a robot really is unnecessary. They just do work, so us humans don't have to.
Gay robots would be happy robots. Homosexual robots would go shopping all the time and obsess over celebrity relationships.