why the fossil record is mostly males
Because it can be, that's why. Population bottleneck is female reproduction. You can impregnate X females with X males, or 0.5X males, or 0.25X males. Wiping out males has a much lower effect on the future population of a group than wiping out females, so over time a group that loses a lot of males is better off than a group that loses a lot of females, and has more members to die and become fossils.