Board Thread:Questions and Answers/@comment-33470269-20171018202237/@comment-35923506-20180619040736

To kill humans. Metta said "I was first created as a human eradication robot" like you mentioned, but since Alphys was Mettaton's (robot body) creator, she knows why she built Mettaton. "Originally I built him to be an entertainment robot." Then she added the Death Blaster and Lazers, and gave him a chainsaw for whatever crazy plan.

Plus, he might have been givin the title of human eradication robot to entertain others or give them hope or something. Either way, if you read his journals in his house they even say that he followed his dream of becoming a star and left Napstablook at the snail farm.