First of all, C/C++ can do static linking as well as dynamic linking. If static linking is preferred, people will do it. Second, dynamic linking is necessary because of how modern OSs are designed. Most GUIs are gigantic libraries that cannot be statically linked. Similarly for network code and other areas of modern OSs.