There were so few people in North Dakota when the law was written, they didn't feel the need to be gender specific. Margaret knew she could take Jebediah or Ezekiel's last name through marriage, and they both knew they couldn't take Margaret's. Why write that down in the law?