Spoofing is illegal when it's used to defraud, but there are legitimate uses for changing the displayed Caller ID number. A bank customer service center for instance, could display an 800 number for call backs rather than an individual operator's direct number so the call can be handled by the next available agent. The same can apply to large companies that want incoming calls to go to a menu rather than to an individual that may not be available.
There is a number identification system that can't be spoofed and even overrides Caller ID blocking. It's called "Automatic Number Identification" (ANI), and is quite expensive to subscribe to. It's typically used by companies that want to identify the caller so the call can be routed to the correct department, region, etc.