It is used as "the what, the why". It has Latin origin where quid ( pr . cuid) has the same meaning. [Note: in the dictionary are published many Latin expressions with this pronoun, which being in Latin for Spanish are locutions; and also some in Castilian that use it, but these would no longer be locutions. ]
* Only one "like" per meaning and day, the more "likes" the meaning will appear higher in the list