That is a simple description, but it misses out a whole lot. An ECU is a computer. It holds a map for the engine. In fact, it holds a whole bunch of maps for that engine, and it can choose to apply a particular map based on the particular set of circumstances. The map (and basically, what we are talking about is throttle response, how direct or how gentle) can be selected based on throttle position, engine revs, gear selection, bike speed, bike attitude in three axes, suspension position, air temperature, wheelspin (based on a comparison of front and rear wheels). Yamaha also have software which is predictive: e.g. it knows the delta, or rate of change, of many of those parameters, and based on the rate of change, it can take the appropriate action. Using the gyroscope, it can calculate that the bike is changing its pitch rapidly (e.g. starting to wheelie) and can soften the map or cut the power to provide anti-wheelie. It knows what lap the bike is on, and knows roughly what the tire wear is like on that lap, and can estimate how much power it needs to cut on corner exit to limit sliding, and can recalculate on the fly if the bike slides or spins more.
In short, the ECU holds a bunch of maps. But the clever (and really expensive) stuff is in working out which map to use. It is the software that controls map selection which is the clever and expensive part. A spec ECU would prevent teams from altering the software, and only allow them to upload maps to the ECU. It would also control the variables the teams can use for map selection.