Regardless of legality of the flight...
1. The formation leader is responsible for his wingman at all times when in close formation. That includes obstacle and ground clearance.
2. The wingman is responsible for maintaining station as directed by lead.
At a guess, if I am permitted the liberty on this forum, I would say that the lead was dusting and the accident aircraft might have been designated as a photo chase aircraft for some purpose...