The author of Pac-Man, Toru Iwatani, has said the following about the character:
Pac Man's character is difficult to explain even to the Japanese -- he is an innocent character. He hasn't been educated to discern between good and evil. He acts more like a small child than a grown-up person.
Think of him as a child learning in the course of his daily activities. If some one tells him guns are evil, he would be the type to rush out and eat guns. But he would most probably eat any gun, even the pistols of policemen who need them.
Read more about the
history of the game