The washer lid would not lock because the detergent cup was sitting on the rim
Funny/WTFI loaded the washing machine, added detergent and lowered the lid.
It stopped just before closing.
The detergent measuring cup was resting on the back rim, partly hidden behind the open lid. When the lid came down, it met the cup first and stayed slightly raised.
I removed the cup, wiped the rim and stored the cup with the detergent. The lid closed and locked normally.
The machine had not developed a mysterious latch problem between loads. It was declining to wash one plastic cup balanced outside the drum.
The cup had been visible the whole time, just not from the angle where I was repeatedly examining the latch.
Sometimes the obstruction is not hidden. It is merely standing behind the thing being closed.