I don't think Sir Alec ever thought there would be sequels. Especially since he dies in the first movie.
I think it's just a matter of good bargaining. At the time, Guinness had been in the movies for three-plus decades. Prowse's career hovered just above the "extra" category. Prowse probably signed whatever contract they gave him; Guinness probably dictated terms.