Why does an inorder traversal of a binary search tree visit the keys in ascending order?
Inorder visits the left subtree, then the node, then the right subtree. The ordering property says exactly that everything on the left is ≤ the node and everything on the right is ≥ it, so applying that at every node yields the keys sorted.
Take any node v. Inorder visits all of v's left subtree before v and all of its right subtree after v. The ordering property guarantees that the keys on the left are ≤ key(v) and those on the right are ≥ key(v), so v is visited in its correct sorted position relative to its own subtree. Since the same holds at every node recursively, the whole sequence is sorted.
For the tree with root 6, children 2 and 9, 2's children 1 and 4, and 9's left child 8, inorder gives 1, 2, 4, 6, 8, 9.
This also works as a test: a binary tree is a valid binary search tree exactly when its inorder traversal is in non-decreasing order. And it is a sorting method: insert n keys into a binary search tree, traverse inorder, and they come out sorted.
Go deeper:
Tree traversal: in-order — the left, node, right order and why it yields sorted output on a search tree.