Did your mechanic read the codes to come to the conclusion that the O2 sensors were bad? If not then that is probably why he replaced all three. A bad O2 sensor can make the CEL come on. Also, they don't tend to last much past 80K miles. He probably didn't want to take the time or didn't know how to troubleshoot it properly to determine which of the three were bad so he played it safe and replaced all three (at your expense). It is possible that the other two may have failed any time now in which case he may have saved you some money. On the other hand they may have lasted another 20K miles so he may have spent your money unnecessarily. The bad thing is he didn't give you a choice. There is no way to know if he did the right thing now. It's anyone's guess when the other two were going to fail. I have 91K miles on my four O2 sensors without any hints of problems. I have the capability to tell which one is bad in the event one does finally fail. When it does, I will replace one and not all four (unless I can get a four for one deal).
Also, like the other post mentioned, O2 sensors are not the only thing that can set off the CEL. A bad gas cap can cause it along with about 300 other things. If you mechanic only recently fixed your CEL don't be too surprised if it comes back on, especially if he didn't do any troubleshooting. It is possible that he got a bad O2 code for all three although I highly doubt it.