Counting Sort - Stable - Logic: Interactive Visualizer

Why right-to-left placement with prefix-sum end-pointers preserves the original order of equal keys.