I'm not OP, but I imagine the concern is doing work for the company (i.e. fixing a bug in their codebase) without getting paid at least minimum wage for it.
Ah, I assumed it was just a realistic looking exercise. If they actually used code written by the applicant, I can definitely see all kinds of problems!
If I were designing this question I would probably use a real bug that we recently fixed. We'd already have a sense for how hard of a problem it was, and there's no worry about unpaid work.