Who’s talking “legally”? I generally don’t see laws legalizing atrocities. It is lore passed down through the generations. And what about pogroms? Those were part of a legal system?
OK. There is no evidence “primae noctis” was ever a widespread or ongoing custom anywhere in Europe. As I said, no doubt there were criminal lords who did this, but it was most certainly never considered normal or routine.