It is NOT an 'attachment'. It is NOT a 'bond'. It is NOT 'mental telepathy'. It sure is not that the horse has 'memorized. What it has to do next (heaven forbid!)
It is totally a very high level of training. It is a matter of the horse listening and responding correctly to the tiniest, almost imperceptible aid used by the rider. The rider is good enough to stay completely 'centered' and out of the horse's way so that every little move has a clear meaning to the horse.
At this level, it takes more training effort, skill and time to keep a horse from anticipating and initiating a move on its own. They have to listen 100% and wait on a rider 100% -- every stride and every move they make must be scripted by the rider.