What are they for ?

They're plastic lines, like a vacuum line. One goes all the way up and into/under the headliner, the other stops halfway up the A pillar and is covered with a little piece of foam.
I was hardwiring my radar detector and I noticed them in the process of doing that.