According to john dewey, philosophy arises from: struggle with social or moral problems
Philosophy is an academic discipline that study the fundamental nature of reality, knowledge, an existence.
People who have questions about all these things, tend to struggle with the social or moral value that they're forced to face within their culture