They don’t.
To make a fair comparison with a different type of engine, you must compare the pumping capacity of the engine per crankshaft (or eccentric shaft in the rotary) rotation. A rotary is sized by multiplying the displacement of one rotor face by the number of rotors. Every revolution of the eccentric shaft brings one rotor face through a combustion cycle, therefore the engine pumps its total rated displacement with one revolution of the shaft.
A four stroke piston engine however, only brings a piston through its combustion cycle once every two revolutions of the crankshaft. In terms of pumping capacity, a rotary engine of the same rated capacity has double the swept volume of the four stroke piston engine. In any number of shaft revolutions it has twice as many combustion events.
So, back to the fair comparison, a Mazda 12A has a rated capacity of 1146cc. To fairly compare this with a 4 stroke piston engine that can pump the same volume of gas per revolution, we need a 2.3l engine.
The 12A in an RX-2 (1970–1974) is rated at 130hp, lets compare that with a piston engine from the same era with the same sporty application. The L24 in a Datsun 240Z is 2393cc, and produces 148hp. That’s slightly more than the fair 2.3l comparison engine so lets scale it back accordingly to 95.7% of its capacity and power output. This puts it at 142hp.
So you see, in an apples for apples comparison the piston engine is more powerful. It will also outlast the rotary, use less fuel, and require less maintenance.