Is it actually illegal to market homebrew on DS.
Yes. You need to be a certified Nintendo developer, and the product has to pass certain quality criteria in order to be allowed to be released on the platform (called Lot Check with Nintendo, Technical Requirement Checklist with Sony and Technical Certification Requirements with Microsoft).