First, ask yourself why numbers where the digits add up to a multiple of nine are divisible by nine. Let's take the example
a+b+c = multiple of nine, then is 100a+10b+c is divible by nine?
100a + 10b + c = (99a + 9b) + (a + b + c) = 9 (11a + b) + (a + b + c)
The first term is clearly divisible by nine, so if (a+b+c) is divisible by nine, then the entire number is. The same technique works for numbers divisible by three. You can see that this will work for any number of digits. For example, four digits would yield
9(111a + 11b + c) + (a + b + c + d)
So back to your original question, any collection of digits that adds up to a multiple of nine can be arranged in any manner and will still be divisible by nine. It just so happens that the sum of the digits 1-9 is 45, so it always works.