after the ride you've gotta try to dry the chain and get some oil on it, unless it's old a cruddy, and you don't give a **** about it.
I've had chains develop surface rust overnight after a wet ride. It's also handy to make sure the cassette doesn't sit with water on it for a long time. It's preferable to give the chain, cassette and chainrigs a clean before your next ride.
Chains and cassettes aren't as crucial as other parts because they're replaced periodically. What's much more important is making sure most of the threaded parts (especially the very tight bits) are greased to prevent seizing as a result of corrosion, or treated with something else to prevent seizing. Most important are the bottom bracket, seatpost (especially if it's aluminium), pedals and cranks bolts. It's also preferable to grease the brake caliper bolts (in the frame and fork), brake cable clamp bolts, brake pad bolts, seat collar bolt, seat clamp bolt, all the stem bolts, and chainrings bolts.....I've probably forgotten some
If your bike has been thrown together by some bike shop monkey
)), I'd doubt the basics, such as the pedals, cranks and bottom bracket, would've been greased.
I'm not a big fan of lubing cables, because it seems to attract more gunk that it's worth.