Because in many countries, XP is the most used OS, and Firefox is the only well supported browser on it. Hence it's a significant market share they can get without any competition fighting for it.
About 15% of Firefox users run XP, a little more than Windows 10 or OS X. Even if Mozilla dropped support for XP, I doubt those users would switch to some other unsupported browser. Firefox wouldn't lose those users (in Statcounter metrics), but they would be stuck on the same Firefox version forever.