Right component supplies the sound (guī → guà, a regular Old Chinese tone-and-final shift in the velar-vowel family).
圭 itself is two stacked
土 'earth' — a pictograph of a long jade tablet that nobles held during audiences with the emperor. The tablets were displayed by being hung on stands, so faint semantic echo too. Same phonetic in
街 (street),
佳 (excellent),
桂 (cassia/Guangxi).