AMIS30543 - Library code | Order of pinDirection and pinOut
The library is doing this to make sure, that the pin will never go low during initialization.
Imagine doing it the other way round:
pinMode(ssPin, OUTPUT);
digitalWrite(ssPin, HIGH);

If the corresponding PORT bit is set to zero (LOW) previously (which is also the standard after reset/power cycle), the pin will go LOW for a very short time, until digitalWrite() sets it HIGH again. That LOW time is short, but it might needlessly activate the slave. If you first use digitalWrite(ssPin, HIGH), you activate the internal pullup (as standard mode after reset/power cycle is INPUT) and set the corresponding PORT bit to 1. Thus, when you now change the pin mode, the pin is HIGH immediately, without ever going to LOW in between.
Internally the Arduino uses 3 SFRs (Special Function Registers), which are directly connected to the IO hardware of the pins. The DDR register of each port controls the &quot;pin mode&quot; aka direction of the pin (input or output). The PORT register controls the output value (HIGH or LOW; or turning the pullup resistor on or off in input mode). The PIN register reflects the current state of the pin (for reading it). In this case the double function of the PORT register is important, as it activates the internal pullup resistor, when set while in input mode.