Market efficiency depends on competitive ecology
How efficient a market is depends on how many participants compete for the same profit opportunities and how well their heuristics fit current conditions. When many well-adapted competitors crowd a niche, prices become efficient and profits vanish. When the environment shifts or competitors exit, inefficiencies reappear until new or better-adapted participants move in.