What factors made my flight land at runway 02 in El Prat?
Because 02 is the default runway for landing during nighttime (23 local time to 07 local time).

Night time configuration between 2300 and 0700 LT:
Preferential: North configuration intersecting runways
Arrivals: 02
Departures: 07R

(AIP Spain AD-2 LEBL - 8)
Airports usually have preferential runway configurations that will be used unless certain conditions (such as weather) require something else. These are usually created to avoid excessive noise to adjacent residential areas and to maximise traffic throughput.