Adhering to moral standards is not the sole responsibility of the companies. How is a company supposed to tackle the situation of candidates not joining after accepting an offer ?
An overall neat and clean solution requires all corners to be covered
Students need to realise that they themselves have created this problem in trying to milk the opportunity of so many choices of available jobs. At any point in time, a student wants to have 4 jobs in hand and with nothing to lose, delays the final decision as much as he can.
For every action there's a reaction for the attainment of equilibrium. Hence companies as well have devised ways to counter the menace of students not turning up after accepting an offer.
Grofers has done well to cover itself legally