Is it possible to say that the main reason that Shakespeare wrote many of his plays is to entertain the people of the Elizabethian era.

I'm not sure that was his main reason. I suspect he enjoyed writing plays and it provided him with a decent living.