That was a bad (or at least stupid) thing to say. No matter the context, why would he ever say, "whether you like it or not." A big gaffe, the kind of thing Biden constantly gets harangued for, and Trump deserves the criticism, too. As you said, he should know better and have more discipline.