If the lid switch was not functioning it will not allow the washer to go into spin (where the drain also takes place) as a safety precaution. Another symptom of that particular failure is the timer's movement will also stop at that point and never move further on its own.
If that is what is occurring, the lid switch (see the following link) may be defective or there could be a problem with its actuation system.