But Venus and Mercury have lost their rotation, not having a massive moon to keep them rotating, against solar tides slowing them.
Mars has kept its rotation by its distance from the sun. Its tiny moons help only a little.
Mercury is weird. It is tidally locked, but not like our moon. Mercury rotates around its axis three times for every two orbits. (Which I just learned while writing this comment because as a child my books told me it had a permanent sunward side.)
On its face, it is surprising that rotational direction can change, but rotational momentum is conserved not by individual bodies, but by the whole, interacting system, subject also to conservation of energy. So, momentum and energy trade around between bodies in complicated ways.
Somebody double check this please. ;) Also, the Sun will only last for another 4B years.