Loop interchange primarily optimizes spatial locality by reordering nested loops to access multi-dimensional array elements contiguously in memory, matching the system's memory layout (e.g., row-major). This ensures that when one data element is fetched into the cache, subsequent elements that are likely to be accessed are already present in the same cache line, minimizing cache misses.