Explain the purpose of the volatile keyword in C. Provide a concrete scenario in embedded development where omitting it would cause a bug.