Some of the greatest actors and actresses are given, rightfully so, creative license and in doing so have created some amazing movies that would never have had the level of success that they achieved. That is really the art of acting. When you have somebody who is an amazing actor who can really bring that character to life it's amazing and what mega stars are paid to do.
He was likely upset, which is the reason why he did not learn his lines. He thought he had been cast as both the body and the voice of Darth Vader, and did this grudgingly. It is not professional though, as it could have caused his scene partners to have trouble responding.
If David Prowse otherwise came to work, behaved appropriately and did what he was supposed to do, then he wasn't necessarily being unprofessional. I still think he should have at least tried to learn his lines or come close to them for continuity and for the comfort of his fellow cast.
Actors are quite well paid for their work, especially when you consider there is no actual heavy lifting, sales targets, screaming children or live ammunition. Just do your job and let the movie happen. Improvising lines that won't appear in the movie anyway seems petulant on the order of absurd. Also, why is my response expected to be grammatically correct and the questions allowed to be structural trainwrecks?