"Necessary" depends on the person and area.
I don't need a lock, for instance. I have one but haven't carried it for years.
For me:
Helmet, gloves, tools (tire levers, spare tube, pump, multitool, spare master link), lights (extremely bright tail, like a Cygolite Hotshot or MagicShine, AT LEAST 200 lumens up front, prefer 400 - a $35 flashlight will do this). Mirror (I prefer helmet, Cycleaware Reflex is my fav). Whatever junk carrying bag you prefer - I use Nashbar waterproof panniers.
I have other stuff (horn, cycle computer, pedal/shoe of choice, etc) but those are options. Shoe may not be - when I ride very far in sneakers it gets painful since they flex so much that they cause cramps.
__________________
Work: the 8 hours that separates bike rides.