Waiting tables is a hard job, and not everyone can do it well. It's physically and mentally taxing, and to make money at it you have to be charming which is harder to train than, say, packing boxes in a warehouse.
Good-paying waiter jobs tend to be in high-cost cities, so you'll spend more money on housing, transit, and food than a worker in a suburban warehouse. Waiters are also harder to substitute for - due to the small scale and personal nature of restaurant service, it's unlikely a restaurant could drastically improve waiter productivity without impacting the customer experience.
Also, to your point in comparing the hourly rate: warehouse and office jobs offer a different type of financial value to workers - relatively predictable schedules. If you're a student, working a few evenings a week and raking in tips is great. If you're trying to support a family, getting consistent full time hours may be more appealing than a higher hourly wage with lower/less consistent hours.