Eating slightly above maintenance will make you gain weight, but it balances out after a while. Gain a few pounds, TDEE goes up, and you stop gaining weight. If you keep increasing your daily calories as you gain weight, you keep gaining. That happens a lot. People with no discipline or self control tend to eat more and more despite seeing how fat they're getting.