I wonder what made day lengths so close on Mars and Earth.

Good question, wwh. Haven't got a clue. But fact that length of day has no correspondence to the distance to the sun (which varies widely at perigee and apogee) is counter-intuitive to this astrophysically-challenged observer.