There are experiments  showing that our brain tries to maximize amount of dopamine. At the same time it is the brain who controls the dopamine level, because the reward system is located in the brain and if we'll stimulate specific brain areas, our body will produce dopamine.
My question is: why can't our brain learn to constantly stimulate this "reward system" area? Why it learns such complex things like doing math, playing chess, helping other people, etc., which in the far end increase dopamine level (by feeling "evrika" moment, winning a competition, seeing other people grateful) when it can just fool its reward system and manually send electrical signals into it? It is a much more easier and lucrative task.
P.S. I am not a biologist at all and will be very thankful if you formulate your answers easier than wikipedia articles which are a big struggle for me to comprehend.
P.P.S. I'd like to conduct some research in machine learning (neural networks, to be precise) and was thinking about how our brain prevents such devastating overfitting because underlying concepts can be very useful.