Both paintings were made by Pablo Picasso. These pieces are similar because one of them is the sketch, and the other one is the final art. About the purpose, it depends on what you want to know. If by the purpose you refer to the reason they had made, so it was to show how the cubist art was portrayed, and that beauty can be seen and expressed through many forms. Now, if by the purpose you mean why he made two, then the answer is one it was served as a guide to the final piece.
Images are traditionally frowned on in Islamic Art because images cannot be trusted the way words can. People could have different perspective if you show them a picture, hence making it difficult to point out its real meaning. Also, humans are thought to be a symbol of filth.