This is because of Newton's third Law of Motion i.e., EVERY ACTION HAS AN OPPOSITE AND AN EQUAL REACTION AND ACTS ON BOTH THE OBJECTS'
So when the fireman directs the stream of water from the pipe which is the forward action, the backward action i.e., the hose moves back