Yes, they built the original Yonge subway with the gauge that exactly matches the existing streetcars, and apparently made use of some equipment commonality.
Of course one can ask why the streetcars aren't standard gauge. I don't know, but would guess that no "standard" existed when the first streetcars were introduced to Toronto, and every rail company was choosing any gauge they liked.
Back to this day; mainline compatibility isn't just about the gauge, other factors are the car profile, the power collection method, the voltage, and the collision strength. The latter determines if the passenger trains are allowed to run on mainline tracks alongside with freight trains.
The optimal parameters for the mostly underground subway trains aren't same as for the mostly surface-running electric commuter trains. For the subways, you want car profiles closer to circular or squared (easier to build tunnels), 3-rd rail power (fits the profile), voltage equal to several hundred Volts (more safe than several-thousand Volts). For the commuter trains, you'd rather have tall and relatively narrow cars (saves the corridor width), overhead catenary (more safe), high voltage (results in smaller transmission losses, which matters more at greater distances traveled).
Surely you can put a commuter train in a tunnel, but it will only be cost-effective if the tunnel section is relatively short and the cost of building it is eclipsed by the benefit of using the existing rail corridors to reach the outer areas.