Penny's unexpected move from being a waitress to a bartender on The Big Bang Theory season 4 was due to an unfortunate accident involving Kaley Cuoco, the actress who played her. Cuoco fell off of her horse and had to miss two episodes of the show. When she returned, the writers decided to put her behind the bar to hide her leg cast.
The change in Penny's job ended up sticking for a couple of years and opened up opportunities for comedic situations. As a bartender, she became close with Sheldon, who even sought her advice on personal problems. Viewers didn't mind the change and enjoyed seeing Penny in her new role.