My theory is the "a bad agreement is worse than no agreement" line is meant to suggest to (uninformed) people that if the UK can't come to an agreement with the EU over Brexit, then the status quo will continue. In other words, things will be better, or nothing will change. Of course that's not what will happen. "No agreement" essentially rips up almost all treaty/trade/immigration relationships between the UK and the rest of the world and requires them to start from scratch on everything. Among other things, millions of people in the UK and in EU countries would suddenly have no legal residency or work status.
It is almost impossible to think of a deal which would be worse than no deal at all.