You are right Virendra and also posted a good question. They should not ask the image codes or the auto generated text or numbers. We can not replace it. May, they have to verify that the user opened by the same person managing account or by any anonymous.
First of all, let me tell you that these texts or images are known as 'Captcha', an acronym to describe it.
Now the answer to your query is, that probably the spammers who make a number of fake accounts have tricky methods of easy login and posting same messages simultaneously, you know that's what is their work! So, to prevent them from loging in, simply with the use of commands, captcha technique is used there.
For further information, search the term in Wikipedia.