That would depend on what kind of racing you do. I'm pretty sure Spec Miata requires you to run a stock ECU. And it's literally the most popular racing series on the planet.
And Spec Miata is a pretty terrible example anyways... at the point where you're dumping 10k into a $500 motor I don't think you can talk about stock anything...