Your lecture makes the assumption that we are going to know all the time up front that it's a salesman. That's just not the case.
While I don't personally have a problem telling sales people no politely (before they get aggressive), my wife isn't as forceful and often doesn't know how to react to them. Sales people prey on that vulnerability. So yes, in an ideal world, it would save everyone trouble if we always knew that someone was a salesman, but the responsibility shouldn't be on me to divine that intent with every door knock.