The efficient market hypothesis is a useful framework to understand complicated dynamic markets, but like almost all economic theories it isn't like a law of physics that explains reality 100%, but is a partial abstraction that explains key patterns of human behavior and information flow within markets.
You can think of it like a form of compression: it condenses an incredibly complex, chaotic system into something we can reason about. That simplification makes it powerful and insightful, but it also means that a lot of nuance and unpredictability are lost in the process. In contrast, a physical law can be calculated precisely and consistently, while market behavior is always shaped by human psychology, uncertainty, and imperfect information.