That's generally the rule at most privately owned eatery. No outside food/beverage.
Also for health and safety reasons.
Sometimes certain places give leeway, but sometimes people take that privilege and tries to make it a norm which it isn't.
From a health and safety reason: if someone bringing outside food in and got sick. Is it your fault or not? Investigation will need to be done to determine who's fault etc and meanwhile rumours will spread about your pub or restaurant.
Just a big risk for headaches and bad publicity if the unfortunate event happens.
From a business perspective: you are just giving yourself less earnings.