Sure he did. I agree the kid shouldn't have taken it, though - a conviction is going to be harder to get if you don't have the evidence intact.
I'm sure that the principal can document extensive boy's-room vandalism in support of the substantial outlay required to install a secret camera. Or, he could be a perv abusing his office for a cheap thrill. Could go either way but I know where I'd bet.
If the pervert wants his camera back, he has to admit puttingit there.