This part of the issue has been less focused on than the racist angle, but the fact that kids are scared to tinker because of the zero-tolerance hyper-sensitivity of schools is in my mind the more interesting part of the story.
You're probably not wrong, but it's hugely sad to me that you consider it a bad idea to bring in a personal project, with permission, advance notification, and repeated clarifications of what it actually is, simply because it "could be perceived as a bomb" (which means it has wires?). I can't think of a better way to discourage kids from tinkering around with electronics.
While I suspect that a lot of this is due to a generational divide between administrators and students, the message this sends is that students should not be interested in science and engineering because those topics sort of abstractly distant and scary. Students should be ENCOURAGED, not punished for being creative and inventive, even if it means they're being a little bit subversive or have viewpoints that run counter to those in people of positions of authority.
I'm sure this is part of it, but the theory[1] that schools in general are built around churning out uncreative, docile workers for the industrial economy has been around for a long, long time. Hell, "Another Brick in the Wall" was, what, 1978?
[1] Note that I'm specifying that this is a theory since I've never done enough research on both sides to feel certain that this is a particularly well-founded belief. What little I've heard is fairly plausible.
And women should dress modestly because you know... there are bad people out there who might perceive a short skirt as an invitation, amirite?
In short, yes, it perhaps wasn't the greatest idea for Ahmed to be walking around in school with something that could be perceived as a bomb, but you'd think the police/school administration would have figured out he meant no harm after he told them several times that it was simply a clock. The outrage here is over the extreme reaction, not over the wisdom of his actions.