Data sheet of SN74HC164 regarding the output current
Page 3 in the Absolute Max Ratings chart, shows +-25mA.

This is the maximum ratings for that device, do not allow it to sink or source more than this, with all it's outputs on. 

Cover page is referring to each output pin, being able to sink/source up to 4mA each. If you had all 8 outputs at maximum current sink, you would be exeeding the max ratings by (32-25 =) 7mA. The device will probably overheat and become damaged.