I agree with the other responses, you would never say "why not doing...". But I can't really think of anyone asking 'why not do your homework' because it sounds weird.
There are much more common formations of the same question. For example,
If you were asking why a specific person was not doing their homework you would ask them directly:
'Why are you not doing your homework', or
'why have you not done your homework' or
'why haven't you done your homework' or
another, more verbose way would be "why would you not do your homework"