What is this metal piece coming out of my sprinkler system piping?
That's an anti-siphon (or vacuum breaker) valve:

Source
It prevents dirty yard water from being sucked back into the potable water system if the water pressure fails.