Why do some people pose as military heroes?

Impostors who wear military medals they have not earned could face jail if a bill is passed. What drives these "Walter Mittys" to invent fake tales of heroism?