Basically like the functionality of a rear-view mirror in a car. It's made known that pilots have all the information, hence they might not need the feature, but my question is to know if such a feature exists in modern commercial airlines.
Some do, some don't.
It depends by the type of the aircraft and by the need to see behind the aircraft itself.
Just as an example, this is a render of a Boeing F/A-18E "Super-Hornet" cockpit:
On the canopy's frame are located three adjustable mirrors (like the one on the windshield of a car) the pilot can use to see what's happening behind him.
As already stated in comments, aircraft usually don't "power-back" and there is no overtaking like in cars (where cars from behind can overtake you just from left or right), so usually there is no need of mirrors inside a cockpit.
In a military aircraft, mirrors increase your situational awareness, but
- with a wide Field-of-View (FoV), details or a distant aircraft or missile cannot be seen
- with a narrow FoV, a smaller portion of the sky is visible
Just for reference, the F-16 or the F-22, both featuring a single piece canopy, don't have rear view mirrors. The pilot must turn the head as much as he/she can and look behind.
There is one example that I can think of.
The Norhrop Grumman AN / AAQ-37 Distributed Aperture System,
Developed for the F-35 airplane, this sensor suite for the aircraft consists of six visible and infrared cameras placed at points around the fuselage. The images which these cameras create are fed to a central processor, which not only uses the information for automated functions such as missile launch warnings, but also creates a 360deg picture of the space around the jet projected directly onto the visor of the pilot's half million dollar helmet.