Two reasons they do it.
First, it’s a balm against the “uppity” independent women in their lives who have the freedom to fuck who they want but pointedly won’t fuck them. Very comfy sour grapes.
Second, "I’m pure and only will date others equally pure” is a much better story to tell yourself than “Nobody will fuck me”. Ego preserving.