The bulkhead pockets are held on with poppers I think, and the weight of a laptop combined with one or other of Newton's laws presumably causes a risk they'll detach.
Cabin crew don't have time for risk assessments and are not empowered to make judgement calls on fine distinctions - if a screen plus a keyboard is what they have been told is a laptop, then that's what it is.
And as others have said, follow crew instructions. It's the law anyway, but as a matter of common courtesy it's the easiest path.