It is probably since they went to purely mechanical switches which need to be in the pedal box , and usually in a cheap plastic housing .
In my earlier cars , the brake light switch was hydraulically actuated and usually screwed into the master cylinder . Being a sealed metal unit water ingress wasn’t an issue , although they could fail in later life .