Pubs have to adhere to social distancing and test and trace.
Your friends or family houses do not
It's not hard to grasp
Ok. So if it's so easy to grasp.
If I am in someone's house I can socially distance , wear a mask and santitise my hands regularly.
Outside pubs in town on a Saturday night will be full of drunk people who by that point will have no self awareness to socially distance with each other. You know because they are drunk, no way is a drunk person keeping 2 metres apart and not hugging everyone they meet down the street for example.
Yet by your logic, sanitised, socially distanced and mask wearing me is at more risk with a friend or family member than Mr and Mrs drunkards hugging and dancing and getting off with random people after being in the pub.
Does that make sense ?