Yes it matters.
Q7 goes to DP, 6 to G, 5 to F, etc.
TPIC6B595 - shift in 1, output goes low, sinks current from common anode display. Cannot source current (drive high), only sink (drive low).
74HC595 - shift in 1, output goes high, sources current to common cathode display.
Flip all the bits - then shift in 0, sinks current from common anode display.