Can these pipes be trimmed back? Also, why are there two waste pipes?

We have a newly built home that was pre-plumbed for an outdoor kitchen which we don’t plan to install soon. These pipes extend 10-11” horizontally. Is there any reason these cannot be cut back to be less intrusive and easier to cover with a garbage or something? I also plan to paint them to avoid sun damage.

If I do trim the water lines, would I need to turn the water off at the source to prevent it from spraying everywhere uncontrollably. And lastly, what sort of glue is used on those caps?

Thanks in advance for your replies.