It’s to give the best possible chance of pregnancy in any given month. EWCM is the best environment for sperm to live and move in, so if there’s lots of it there then more of the c. 200 million-500 million sperm in the average ejaculation will survive the 4 days to ovulation. By that time they’ll likely be in the right place (fallopian tubes), waiting for the egg to pop. Ok, better still if sex happens 2dpo as more of them will still be alive. But if there’s no EWCM 4dpo then any sex that happens then has a near zero chance of resulting in a pregnancy. If there is EWCM the chances are not as good as a day or two later, but it could still happen. It’s just evolution playing the odds.