What is the purpose of this valve in my garage
I had something like this in my garage where a water softener was previously.  When the water softener was removed it was easier for the previous owner to just connect the pipes instead of opening up the wall and/or rerouting the plumbing to a less noticible location.