This is a strange take.

Sex is - barring IVF - required for procreation. But saying that sex has a purpose implies a creator. And once you require a creator then you're off in the land of theology and biological studies take a back seat.

This is a strange take, evolution resulted in sex as the means to creating the next set of offspring.

Evolution is a process. It can't assign a purpose to anything, because "purpose" doesn't exist outside the minds of people, similar to "justice" and "hope."

The "purpose" of sex is whatever we choose it to be.