YANBU.
I think there are people for whom this kind of stuff is the norm in their circle-and they all engage in it-so they're happy with it and they can crack on.
I personally don't like it when people come over unannounced. If it's family-I don't mind, but anyone else-notice is appreciated.
As much as people are trying to pretend that it's just oh so easy to turn them away if you're busy or play pretend at going out if you don't fancy entertaining them-it's not.
A lot of these types of people who impose themselves on people will find it the height of rudeness if they're not invited in and offered a drink and time for a chat. Which then turns the onus around on the person who was being imposed upon to then be viewed as "rude" when it was the person imposing that was rude in the first place.
Of course, there's a bit of a difference to have someone who is literally just in the area for something else and decides to knock on the door to say hello but open to leaving if not suitable time-and someone who purposefully heads to someone's house, unannounced, and expects to be let in and entertained.
People act like anyone who dares to disagree with unannounced visitors are rude, unsociable, anxiety-laden creatures and that is not the case. Many of us WFH, have lives that we're living and things that we're doing and shit, sometimes, you just want to be left alone and given advanced notice if any visitors are to drop by.
Also, don't get me started on the crowds who turn up unannounced specifically because they know you WFH and of course, that means you're absolutely available for tea and a chat. Seems those people forget that the the W in WFH stands for something.