William Shakespeare absolutely loved to write poems when he was younger so he decided to go and write them for money, but he ended up writing plays too and he did rehearsals and things for them. Then it became a big thing so more and more people would come so he charged them more. Later on in his life he made the Globe Theatre and all the poor people stood up around the middle and the rich sat on balconies.
Shakespeare was inspired to write plays by many other play writers.
He changed real life into more imaginary plays.
We have so little information about Shakespeare's personal life, any answer to this question is likely to be guesswork. His first involvement with the theatre was likely as an actor. While acting his abilities as a writer were somehow noticed (perhaps he shared some sonnets with his close friends) and he was encouraged to help in the writing of plays, probably starting by writing one scene for someone else's play, which was the way Elizabethan playwrights generally got started. From writing scenes he graduated to writing his own plays, which were successful enough to attract the attention of Robert Greene in 1592. When plague closed the theatres in 1593, Shakespeare used this reputation to get the support of the Earl of Southampton and his fellow Stratfordian to publish his poem Venus and Adonis. This poem was so successful that Shakespeare was taken on as a partner in the newly-formed company The Lord Chamberlain's Men in 1594 by its leader (the man who really arranged for and paid for the building of the Globe Theatre), Richard Burbage. Without a doubt, Shakespeare's job description from the very beginning was to write plays exclusively for the new company. As usual, this was a smart business move by Burbage, but it also enabled Shakespeare to make more money than he had ever done before, by writing plays