Ok, I’ll answer the question directly: “men” themselves are not granted the right to legislate on abortion. Rather, legislators are granted this power. Judges, likewise, are given the power to interpret these laws and apply them. Police officers are granted the power to enforce these laws. Any of these positions is open to both men and women; the sex of the individual is simply not an aspect of consideration. In order to do something like restrict such issues to females, new legislation would need to be passed which would officially recognize the sex of the legislator/judge/whomever. This would be the precursor to an endless number of problems. In general, the public would be against such a thing.
Therefore, men get to legislate abortion because there is no law or precedent which recognizes the sex of lawmakers as a condition of their power.