Well, there are such things as tenant/landlord laws. They have to give 24 hours notice when showing or entering the property. 30 days for evictions & the like, here in Ohio anyway. That said, keeping on good terms with the landlord is always a good thing. I'm glad I don't have to deal with that anymore.
The landlord does not have to give notice upon entering a common space; I do suppose this could be different in some states, but I know it is not required in a number of states. That is the case here. There was never a threat of eviction. The landlord identified a safety issue and dealt with it accordingly. At the same time, concerns surrounding the activities the tenant engages in within the common areas came to question. The tenant explained quite well and with a seemingly good attitude (in e-mails), and all has worked out in the end. I'm glad it did work out. Not everyone is in a position to own their own place.
The landlord, in my opinion, was not wrong and is definitely not a home-brew hater. She/he was amicable to hear the tenant's explanation and make some sort of arrangements to keep all happy. If he weren't a good tenant then that landlord would have likely made this all difficult. It pays to be a good tenant and not jump straight to litigation when these things arise.