just my 2cents worth:
1) lemon law largely covers new equipment. 2nd hand will sold as it is, but still cover some warranty. in this case, buyer "accepts" as it is when signed. (should have fine print somewhere)
2) legal action will take some time. but before any court action, usually both parties lawyer will propose an agreement.
3) totalled for insurer case, as said, is based in the repair cost. if repair cost is high, they can totalled the vehicle and compensate market value.
in this case, nothing wrong with insurance side. bike sold to their workshop as workshop willing to buy over is also nothing wrong. same as re-condition the bike and sell off as 2nd hand bike. but if sell as 1st hand bike will be different case.
that's y the shop so yaya and dare u to sue them. it's the same when someone buang badly, repair and sell off, and new buyer happily buy. so lemon law, in some extend, not really cover 2nd hand vehicles.
notice they use "totalled" and not "scrap"