Kaprekar's constant, or 6174, is a constant that arises when we take a 4-digit integer, form the largest and smallest numbers from its digits, and then subtract these two numbers. Continuing with this process of forming and subtracting, we will always arrive at the number 6174. 6174 is known as Kaprekar's constant after the Indian mathematician D. R. Kaprekar. The above process, known as Kaprekar's routine, will always reach its fixed point, 6174, in at most 8 iterations. Once 6174 is reached, the process will continue yielding 7641 – 1467 = 6174.
What exactly is the logic behind this process? Is there any intuitive proof?
The way I see it: imagine all the possible procedures you could do on all the possible intervals of numbers. You're looking for one reasonably simple procedure on an easily described interval which has the property that it has a unique fixed point. Loads of procedures have fixed points (e.g. Brouwer's theorem; $1-1/e \approx 63\%$ of all permutations are not derangements and therefore have at least one fixed point; etc.). Some of them will have unique fixed points. Finding a particularly nice procedure with a unique fixed point is probably going to be challenging, but when crowd-sourced it's not too surprising that somebody found one.
From that perspective, it's likely to be a fluke without any interesting proof. It'd be like looking through millions of rocks on a beach and trying to explain why the roundest one you found was so round. (That said, I'm completely ignorant of the specifics here, and for all I know there is a "nice" proof. That would be surprising, and I'd like to see it.)