This is commonly called power braking, usually called up in an emergency. It's a good technique that preserves handling. If you have RWD, your front suspension will remain more unsprung, in any case you can quickly apply the throttle to maneuver.
The friction isn't what's working here, it is the compression of the cylinders in the engine draining momentum from the wheels, think of it as negative torque.
As the forward momentum of the vehicle causes the rotation of the drivetrain to begin to overcomes the speed of the engine output shaft at the clutch or torque converter, torque is effectively being reversed. Instead of engine output pushing the rotation of the transmission, the forces invert causing the transmission to drive the engine speed upwards. Most ECMs will recognize the zero throttle position and cut off fuel, but older vehicles may not have this capability and especially carburetor fed motors are mostly incapable of reducing fuel delivery in this manner.
If you need to stop quickly and have the time, you can downshift even in an automatic, just throw it into 3 or maybe 2 while braking. If you have an electronic dual-clutch transmission with a "manual" mode, the electronic management controls will prevent the engine from over revving and causing damage.
Its important to keep the RPMs low if you do this a lot, if you redline, you redline no matter what your intentions are. I'd wager that running your ICE at 80-90% redline at low speeds for extended periods is also going to affect longevity.
There are other effects you might notice, such as additional bump and over/under steering as your suspension geometry responds to the unusual load. Also, other components will become loaded in usual ways during this maneuver causing some possibly unexpected handling characteristics to present themselves. Its good to practice this in a safe location, before employing it in the field.
If I may venture to say, it gets even more interesting; some vehicles are constructed in a manner where this happens all the time, the old school Porsches were notorious for an effect known as "Throttle Steer", a description of which exceeds the scope of this post, but a curious person will find several references to this in automotive literature.