Because React.js hot reload (Fast Refresh) actually remounts your component when any imported file changes — not just re-renders it.
So even though you used useEffect([]) and React.memo, the component is destroyed and recreated, causing the effect to run again.