1. Material cause: because wood is rigid and holds its shape
2. Efficient cause: because the carpenter used a plane or chisel to carve away everything that was not that flat surface
3. Formal cause: because that's the blueprint the carpenter used
4. Final cause: because if it were curved your jug of wine would fall over
We can get material, efficient, and formal causes here (the algorithm being the formal cause) without any real controversy. But if I asked a human cryptographer "why is there an XOR in this round?" I'm asking about the fourth one, the final cause or purpose; the cryptographer might answer "because I wanted uncorrelated input bits to stay uncorrelated after this round", or whatever. But talking about that most interesting "why?" as regards an AI's activity is... controversial, to say the least.