Pity some got hung up on whether BL is real or not. I agree, it's purely a mathematical construct, invented by Prandtl and his collaborators to make the fancy math in the Navier Stokes equations more palatable.
Nevertheless, here's my take on the OP. It might be easier to visualize by considering just an airfoil in a flowing fluid like air, say in a wind tunnel. The air flows around the airfoil, of course. The boundary layer, a mathematical construct yet a convenient way to visualize what's going on, can be laminar, or turbulent. If you were able to visualize how the particles were moving in that region close to the airfoil, in the BL, you'd see the particles smoothly following the contour of the airfoil, if the BL was laminar. The particles close to the airfoil stay close. If you traced the paths of these particles, the paths would look like 'lamina,' thin layers, that stack next to the airfoil. These paths would look like progressively larger versions of the same airfoil.
What happens if the BL is turbulent? If you traced those particles' paths, the paths wouldn't look quite so orderly; particles would appear to speed up, slow down, move up and down relative to the airfoil surface.
Why is this important? If you were to calculate total drag (as one poster said, two kinds of drag, friction and pressure--I am talking about all forms of drag on this one airfoil), you'd see the optimum case (minimum drag) is the case with a laminar BL--the flow stays 'attached' over the entire length of the airfoil. This is optimum, which you can sometimes achieve with very smooth airfoils. A worse case (higher drag) occurs when the BL is turbulent over the entire airfoil. Even the tiniest imperfection or dust particle or dead bug can 'trip' the BL, which is, cause the laminar BL to become turbulent.
Why would someone intentionally trip the BL? In reality, perfect laminar flow is almost impossible to achieve; you might have laminar flow over half the airfoil, but the BL trips, becomes turbulent, and the flow can detach from the airfoil--if you traced the particles close to the airfoil, before the detachment point, the particles would stay 'close' to the airfoil; after the detachment point, the particles either seem to move completely away from the airfoil, or the particles stay close to the airfoil, but appear to be going in circles, moving away from the airfoil, then back towards the airfoil. When that happens, there is a huge pressure increase in flow next to the airfoil after the detachment point. Because the pressure increases, the drag goes way up. Obviously very bad.
If we trip the BL right away, say near the leading edge of the airfoil, the BL is turbulent over the entire airfoil. This seems bad, however, because the turbulent BL is more energetic (some people like to think in terms of energy--others, momentum) than the laminar BL, the flow will stay attached to the airfoil for a longer distance over the airfoil, sometimes staying attached over the entire length of the airfoil, even under the same conditions which will cause a laminar BL to detach. Because the BL remains attached longer, that huge pressure bubble is smaller than the laminar case (both in physical size and pressure magnitude), so the total drag on the airfoil with a fully turbulent BL is lower than the total drag on the airfoil with a laminar BL over part of the airfoil surface, but with flow detached over the rest of the airfoil surface.
So you are balancing two effects, pressure drag and friction drag. The ideal case, laminar flow over 100% of the airfoil, minimizes total drag, and especially friction drag. The next higher drag occurs over an airfoil with 100% turbulent BL. The worst case (highest drag) occurs when the flow detaches from the airfoil. Back to the race car, the ideal case is impossible to obtain; the worst case is to be avoided, so the compromise is trip the BL, cause the BL to be turbulent, and hoping that the BL doesn't detach at all, but in any case, trying to keep that BL attached as far along the skin of the race car as possible. In your windshield example, if the BL was laminar right up the edge of the windshield and the roof, once you reach the roof, the flow would detach with no hope of ever reattaching. If the BL was turbulent, you MIGHT get the flow to reattach to the car after the flow separates at the windshield--roof edge.