It was kind of a dick move to create animals that require air, then confine them to the freaking ocean
If you are talking about dolphins they used to be wolf like creatures that due to scarcity of food they had to hunt in water so they slowly evolved into water mammals, dolphins still have claw bones but they are unnecessary and dolphins will get rid of them with time and will develop abilities to breath under water
(This also partially applies to whales)
They were what now?
This is pretty rife with some misinformation.
First of all, whales and dolphins have the same ancestor, the statement that dolphins evolved from wolf-like animals and that it only partially applies to whales is false. WHALES evolved from rodent-like animals, a group of animals that DOLPHINS are a part of. Every dolphin is a whale but not every whale is a dolphin.
Ambulocetus, the walking whale, is the best known early whale. And they didn’t slowly evolve either, this an already highly adapted animal, coming from about 47 million years ago and is already pretty much fully aquatic and its body is designed as such. Cetaceans, whales, didn’t slowly evolve, they basically took advantage of a niche leftover by the large and now extinct aquatic reptiles, and ran with it, evolving rapidly over a short span to go from this:
to this:
In only the span of the eocene.
Also, it’s pretty unlikely that any mammal would evolve gills again, @water-based-introspection is about as incorrect as showerthoughts is.