Human: Why did John Gay write The Beggar’s Opera? Assistant: 
John Gay wrote The Beggar’s Opera to protest against the repressive laws of the time. The play was a satire of the repressive laws of the time, and was a huge success.