I have seen this kind of work in our plant before. After looking in to it we find out that most of the time this light was put in by a mechanic or plumber. They just don't get it about wiring things to code!
The plant where I work pre-tests Electricians prior to hire on code, reading, drwaings, and troubleshooting. They do not test us or require us to keep up to date on code rules. Most of us do it on our own. One problem that we have is so many so called sparky's around the plant, I do this at home, attitude all the time.