First of all, the significant ancestors that started leading to whales were artiodactyls, not rodents. Mordern artiodactyls are things like cows, pigs, deer, and things like that. These are not creatures we'd classify as rodents. Nor did the ancient artiodactyl ancestors of whales "want" to go back into the water. The environment they were around had abundant nutrition in the waters. For some it was easier to catch things in the water, so that's what they did. Thus beginning the process of stepping into a new environment where small changes over time can be selected for until you get creatures that are increasingly suited for that environment.
@SentinelSam1 @NotEvolution1 So they went into the water, and came out because they weren’t fully evolved to live completely in the water and then repeated this until they evolved into a fish….um okay
No, they repeated this until there became a significant population of them that did this, and at some point in time they became distinguished enough from other that we identify their group as Pakicetus. Then a population of that group ended up developing an inner ear that was better for being underwater, and started spending most of its time underwater. It still would come out of the water sometimes and could move to both fresh and salt water environments. We called this group Ambulocetus. Then over time we see these creatures develop flatter tails. The prove to be successful as they start to spread and occupy large amounts of territory in the water. As they grew in proficiency and had access to abundant materials in the water, they had no need to return to land. Thus their legs became smaller and weaker as they didn't serve a purpose and there was no selective need for their bodies to allocate energy to making these structures. Then with a few other unique advantagous developments such as new organs in the brain that allow them to see through ecolocation and the development of teeth into baleen. Now we have modern whales. Whales are mammals. They are not fish.