ETA: I was responding to the bit about both sides being liable, but the thread moved on significantly as I slooooooowly typed.
This actually isn’t true. There are cases in which the law recognizes that one party is better placed to know the true information about the situation and thus is the party punished.
I am 100% transactional, so I am out of my depth in these types of discussions. But, it is not at all inconsistent with legal principles that only the unlicensed contractor would be punished. I can easily articulate an argument for that approach: (i) the contractor is best placed to know if s/he is truly licensed (i.e., homeowner could be victim of fraud); (ii) only the contractor has a legal obligation to be licensed and to keep that license in good order; and (iii) punishment of only the unlicensed contractor (and treble damages esp) creates a huge incentive for contractors to comply with the laws and regulations of the relevant jurisdiction. The state wants to make it REALLY not worth it for them to do work unlicensed by creating such an awful downside that they won’t try it. Losing all your materials costs plus paying 3x damages and attorney fees would certainly incentivize me not to do work I was not licensed to do.
Holding the client liable for lack of license requirements makes no sense as they are not well placed to truly know if the contractor is licensed and shouldn’t have the burden of compliance with regulations that are relevant only to the contractor, not to the client.
A side issue I can see is the practical hurdles to proving the homeowner knew contractor was unlicensed as that information would not likely be recorded in any instrument or otherwise that could be used a proof. Even if it was, it would be an odd bit of evidence to produce in court: “See, I secretly recorded myself telling client I was unlicensed so…oh, wait, never mind.”
I am not representing that this is true for NJ. Someone up thread did note it was true for her state. I’m simply stating that there are situations in which the liability is one sided though two parties were involved. I can easily see a compelling state interest behind unilateral liability and treble damages: get and stay licensed if you want to do contracting work in this state.