Why are bike computers at handle bars not allowed in race (and not smart in training)?

Why not in the races? There are rules against it. See below.

Why not in training? They are distracting the riders. If the track is yours and you are alone. Go for it. If you are sharing the track with other riders – take care of their health and security was well as yours. Track riding is about focus. Focus on the bike, not the computer.

The rules of the game (as of Summer 2021)

UCI Regulations part 3 track racing:

3.2.005 Riders may carry no object on them or on their bicycles that could drop onto the track. They may not bear or use on the track any music player or radio communication system. In addition, any electronic device with display (for instance speedometer or powermeter) must be hidden to that it cannot be read by the riders.

—————————-

In consequence: use you powermeter in the race, but keep the computer at the saddle or the seat post. You could have it at the bars, but it needs to be covered that you cannot read the numbers. Trust me, I will check before I start the race.