Could it be construed that you intended to tip the owners of the establishment rather than the employees?
Considering wage theft is the biggest kind of theft we have, I think it’s an unfortunate fact that many employers don’t particularly care what’s legal as long as you can’t practically retaliate.
Most places have laws against tipping to employees that don’t interact with customers in transaction. So owners, cooks, and managers legally can’t get tips.
Edit: But those laws probably aren’t followed at some establishments
That does depend on the state though too. I worked in a restaurant where any tip on take-out/drive-thru/catering was spread among the kitchen staff. No manager can receive tips, but at least the staff preparing and packaging the food still have an opportunity to earn something extra. When I worked there, because of the tips, I earned an extra $2-$3 a shift.