Apparently, grapes love rocky arid soil with poor nutrition. They can do fine in good quality soil, too. But if you're doing the Agriculture Thing™, you'll want to put your more delicate crops in the better soils, and the hardier types, like grapes, into rougher conditions. Especially when the root structures will stabilize the soil, and the chop-and-drop method of pruning lets the leaves and first-year vines (the ones that produce the grapes) stay in place to provide compost & mulch, improving the soil over time.
Those pit shapes are designed specifically to collect and funnel moisture down to their plants. Are they the most efficient way to typically raise grapes, shape-wise? No, your typical vine-on-a-fence is better...if your soil and moisture conditions allow it.
The location in the Canary Islands where these vineyards are located is exceptionally dry. There isn't enough moisture to allow a long row of easily pruned and easily harvested grapes to grow. Each plant literally needs over a dozen square meters of rainfal space to go to it, and that means no closely spaced neighbors. (They also have half-moon walls built up at the rims to help divert strong, dessicating winds.)
I don't know who got the idea to try planting grapes on these islands, and specifically in these shapes, but it turned out to be pretty worthwhile, as the combination of volcanic gravel, strong sunlight, and so forth has created a lot of remarkably sweet wines that are praised worldwid.
...Writers, sometimes the weird-looking stuff really does work great!