Uno works with SPI on any pins .. how possible ?

Hello,

I'm using the LedControl.h libreary for a MAX7221 display

It works well. The setup is: LedControl(dataPin, clockPin, load/csPin, ndevices)

The library itself allows you to choose your pins (MOSI, CLK, CS), and while I understand that CS can be any pin, I don't understand how this library can work with any MOSI/CLK pin assignment. I tried 7,8,9 for example and it works.

From the arduino uno reference, MOSI is 11, MISO 12 (not needed here), SCK 13

Can someone explain this ? I'm going to design another project and I would like to understand this better

Thank you,
Robse

Can someone explain this ?

That's a so called bit-bang interface. As you can use all pins on the UNO as digital IOs you can emulate the SPI in software. Of course it has a huge performance penalty but for many solutions this isn't a problem.