If you say that you'll eat at a restaurant at a particular date and time and the restaurant owner agrees to the arrangement, then you've both entered into a legally binding contract (even if no deposit has to be paid). If you turn up and the restaurant turns you away because they've overbooked you can sue for compensation. If you fail to turn up the restaurant can sue you for their lost profit (i.e.the cost of the meal on the menu, minus the cost of the ingredients).
As the amount required as a deposit is usually less than the profit on the meal, if you fail to turn up the restaurant is entitled to retain the deposit AND to sue you for the rest of their lost profit. (In practice, of course, it's unlikely that they would try to seek that excess but they most definitely have the right to retain the deposit).