Is locking out really that good/bad?

I hear a lot of people say that locking out is good and others saying it’s bad. Even more confusing, I get pain only on the lockout when squatting (no need to link the article, I already read it that’s not the point), but then I hear people say things like ‘‘nobody has ever been injured while locking out’’. Is it just an issue of weight on the bar or should I push through it as long as it’s not debilitating?