When combined, 擦肩而过 (cā jiān ér guò) literally paints a picture: “to brush (擦) the shoulder (肩) and then (而) pass by (过).” This vivid, physical action forms the basis for its powerful metaphorical meanings.
The soul of 擦肩而过 is deeply intertwined with the Chinese concept of 缘分 (yuánfèn), a type of fate or destiny that connects people. 缘分 dictates who you meet in your life and the nature of your relationship. 擦肩而过 represents a very specific, and often tragic, type of 缘分. It means you had just enough fate to meet or cross paths, but not enough to form a lasting connection. It's the universe bringing two people to the same point in space and time for a fleeting second, only to have them continue on their separate ways.
This chengyu is very common in both written and spoken Chinese, especially when expressing a sense of wistfulness or regret.