Satisfication with irrelevant things
Dopamine is one of many neurotransmitters which modulate information passage between one brain area to another. Dopamine is thought to play important role in  pleasure, addiction,
and learning.Massive increase in the
amount of dopamine released in the brain during video game play, the releasing of dopamine
are in areas thought to control reward and learning.


Reference


Certain neural structures, called the reward system, are critically involved in mediating the effects of reinforcement. A reward is an appetitive stimulus given to a human or some other animal to alter its behavior. Rewards typically serve as reinforcers. A reinforcer is something that, when presented after a behavior, causes the probability of that behavior's occurrence to increase. Note that, just because something is labelled as a reward, it does not necessarily imply that it is a reinforcer. A reward can be defined as reinforcer only if its delivery increases the probability of a behavior.

The reason why we are happy when we get these decorative items is because they are things which we can possess. Reward system is responsible for this kind of behavior, when we gain or achieve something in life its usually gets rewarded in the form of a pleasure. Foraging ants and bees are provided with these reward systems and which in turn makes these animals to derive a pleasure out of their daily achievements. Whether in life, video game or stack exchange or anything, an achievement is something brain thinks relevant and rewards it with a pleasure in mind.
Considering badges in stack exchange, really badges are an analogy to reputation. When we have more badges usually our charisma increases like in the case of reputation. Also levels and scores in games,achievements in office, stack exchange badges and hats all fall under the same analogy. So when we have more badges we are meant to be more successful and brain will reward us to attain more badges and also people like hats too.

References
Digital Media: Transformations in Human Communication - Paul Messaris, Lee Humphreys
Cyber Junkie: Escape the Gaming and Internet Trap - Kevin Roberts