Why does a Check engine message come on?

This alerts the driver that the powertrain control module has detected a system fault that should be investigated.