From the perspective of self-discovery, the purpose of relationships in all forms, whether with lovers, family, friends, colleagues or pets is the same as life itself.
That is, to express, share and celebrate happiness, peace and love, rather than to seek such things from others.
There is non-duality inside the duality.