There’s nothing illegal about playing or transcribing someone else’s music. Publishing it or performing it in public without compensation to the author is another matter altogether.
Define "public". A summer camp campfire is considered public and everything from Happy Birthday onward has been litigated for royalties when sung there.
And the author will not see the royalties. The collection agency will collect them by pressuring establishments to pay a seasonal protection fee, but it offers them blanket protection and does not require a logging of the actual songs, writers, or publishers involved.
So if you pay BMI or ASCAP, your bar is protected if any musician covers their material or if someone plays a CD of their protected songs. But none of that money BMI or ASCAP collected will go to the artist because they do not have a record of who to pay it to.
I know guys who make a living in cover bands. It’s been happening for decades. No royalties have ever been demanded or paid by anyone anywhere, as far as I know.