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