TikTok’s lawsuit fits a pattern – from cigarettes to opioids – of courts stepping in where lawmakers won’t.