What is the purpose of the volatile keyword in C? Provide a scenario in embedded programming where omitting it would cause a system failure.