The somatosensory cortex and the motor cortex are strategically located adjacent to one another to allow for the efficient transfer of signals between the two cortices making the coordination between them smoother.
This is important because the somatosensory cortex is the one responsible for receiving the sensory (i.e. tactile) information from all over our bodies, while the motor cortex is the one that coordinates our bodily movements. For us to be be highly functional and quick to respond to our surroundings, the receiver of the signals (somatosensory cortex) must be able to quickly and efficiently communicate with the coordinator of our movements or physical reactions (motor cortex).