LinkedIn interview question

Explain how and why state management is used in react?