I'm guess you are referring to the characters in the image you have to re-type.
This is called visual verification, VVC, or captcha...
The reason behind it is. Bots, Spam-bots, etc.
Spam-bots are computer programs which create accounts on random forums and then subsequently post links to sites selling little blue pills, anatomy extenders, etc.
These programs can't interpret stuff inside an image / photo, or at least couldn't.
When you register or login, a dynamicly generated image is ... dynamically generated with the characters embedded inside. Unless the characters typed, and the characters in the image match then the bot won't be able to login.
These spam-bots are getting a little more sophisticated, and are starting to incorporate whats called OCR Optical Character Recognition, and are starting to be able to translate the text embedded in an image into real text. So more background noise is added to make it a little more difficult.
When you run forums it's just one of those things you have to put up with, constantly removing bots. Real pain the rear.