The bug
There's a setting in accessibility options called "camera shake." It's enabled by default, but when disabled, it's supposed to prevent the camera from shaking. When you take damage, the camera shakes irrespective of this setting.
How to reproduce
1. Disable the camera shake setting
2. Take damage from a mob
Expected behavior
Camera doesn't shake
Observed behavior
Camera shakes
Notes
Currently this setting does nothing except disable the /camerashake
command, which is irrelevant in 99.9%+ of worlds. If this is the intended behavior, the label for this setting is very misleading and it should be made clear that the setting does not affect normal survival gameplay.
I hope Mojang notices this bug, I have been trying to create a pack editing this feature, but then found out it was impossible. Its like the files that defined it don't exist anymore