Well, it goes waaaaay back with Jesus selecting his apostles. It's because priests are in persona Christi (representing Christ.) ..whilst women can serve, they cannot be ordained. That's the sacrament as per Catholic tradition.

Men and women have different roles, ofc.