Shakespeare was one of the seven actors who invested to build the structure, so he could have had a say in what vendors sold on the property.
Imagine being one of the owners of the theater, writing the plays and then perhaps acting in one of the minor parts. And then imagine also having vendors who sold apples which could be thrown at the stage if things weren't going well. Up to three thousand people could attend a performance, and they weren't likely to sit quietly if they weren't entertained.
Shakespeare had a lot of motivation to write, and he had the ability to see exactly what the audience responded to and how they responded at specific points—a wonderful experience for an author.
And if the audience didn't respond as he wished, he could have increased the mark-up on the apples.
Photo Credit: Fotolia