Lightning network avoiding bad channels
Your concern is genuine but the decision to open a channel is not a part of the core specifications. The decision to open a channel with a node is up to the user.