Why do aircraft need a vertical tailfin, but birds don't? (and lots of fish do?)
Not all of them need a fin:



This is the Horten IV, a flying wing glider that did not need a fin (picture source). Instead, it used spoilers at the wingtips to create yawing moments, and the swept wing helped in improving its weak directional stability. It could afford to do so because it was a glider. The second prototype of a jet-powered flying wing, the Horten IX V2, suffered a crash when one engine failed and the pilot could not end the resulting spiral dive.

Fins on airplanes

Birds have two advantages over airplanes which make a fin superfluous:


A variable geometry wing, where wing span, sweep and incidence can be controlled for each side independently.
Propulsion is integrated into the wing, instead of separate power plants which might fail independently.


An extra advantage of birds over older airplane designs lacking a computerized control system is that the bird's brain is wired to adjust the wing on each side subconsciously and continuously. While a fin provides an aircraft with weathervane stability, a bird is inherently indifferent (neither stable nor unstable) and needs continuous tweaking of its wings for directional control.

If a bird wants to control yaw, it simply adjusts its wingtips such that the drag difference between both creates the desired moment. It can do this by reducing wingspan on one side, which also creates a rolling moment for a coordinated turn. Airplanes unfortunately cannot do the same.

Airplanes need positive directional stability because humans cannot adjust the controls continuously - they need to check maps or work the radio, or maybe just want to relax for a moment. Also, multi-engined designs need a stability margin to compensate the asymmetric thrust resulting from a failed engine. With a fin, the mass of the structure behind the center of gravity now needs a compensating mass ahead of it, and the side area of this forward fuselage is de-stabilizing the aircraft in yaw, requiring yet more area at the vertical tail. This is another problem that birds do not face.



The B-52H 61-023 suffered a structural failure of the fin on January 10, 1964, but managed to limp home with almost no lateral stability left. Had it suffered an additional engine failure, it would had crashed (picture source).

Fins on fish

The dorsal fin of fish helps in their propulsion by balancing the areas above and below their vertebral column. By wagging the tail, they create a side force which creates a sideslip condition at the dorsal fin, which in turn produces a correcting side force so the body does not roll while swimming. In this it can be compared to the keel of a sailboat. The hydrodynamic forces on a keel counteract the side force from the sail in crosswind conditions. Its main function is to stabilize the fish from the yawing motion caused by their tail fins, and this stabilization in turn improves the efficiency of the motion of the tail fin.

An additional function is as a roll sensor. Being located at the maximum girth, it gives the best readings of local sideways motion due to roll. This is the main function in marine mammals where the tail fins are horizontally oriented. In fish which have an adipose fin (located aft of the main fin), this fin is most likely their roll sensor.

It is not used for roll control (except as a sensor in a feedback loop), and cannot because it is not adjustable. Roll control is achieved by the adjustable pelvic fins. It also cannot provide roll stability - this would require it to roll the fish back to its initial attitude after a disturbance. All it can do for the roll movement is to dampen it a little and prevent it when the fin is moved sideways.