Eating the whole fruit give you glucose, fiber, etc., and it's digested more slowly, giving you a low, gradual rise in blood sugar, which is good.

The juice just has the glucose (and other nutrients, obviously) which causes high, steep rises in blood sugar and could contribute to diabetes over time.

It's like the difference between whole wheat and white bread. With a whole apple, you get something more dense, which digests longer, while juice is just a "refined" fruit stripped to just the glucose.