This Whirlpool lid switch is very commonly used in Whirlpool made washers. The point of the lid switch is for the tub to stop spinning when the washer lid is opened. It’s a safety precaution just in case someone decides to stick their hand inside the washer while the tub is spinning. Checking the lid switch for continuity would tell you if it’s bad. You could do that by using an ohmmeter. If it shows no ohms, you most likely need a new lid switch.
This lid switch fits some Whirlpool, Estate, Roper, and Kenmore washers. Made by Whirlpool. Part Number: 3949247.