Australian Constitution, Section 51:
The Parliament shall ... have power to make laws ... with respect to:
...
(xxi) Marriage
This was in the Constitution from the start ... unfortunately.