"The Consortium represents a membership of more than 90 legal entities involved in the mining, smelting, refining and recycling of lead, as well as manufacturers of lead compounds and producers of lead-based automotive and industrial batteries."
Aerospace was exempt from the lead solder ban for 12 years, ending in 2018.
This is one such example of a failure in space due to tin whiskers: https://en.wikipedia.org/wiki/Galaxy_IV
(It's much better now - people know more and the solder is better, but 20 years ago this was a huge issue that sent many devices to landfill)
What I think the problem is and why they have banned lead in consumer electronics is about where all that lead solder ends up. Maybe some is recycled, but I guess most of it ends up in landfills, and a good fraction is just dumped in nature, possibly near drinking water supplies. A few boards won't do much harm, but millions of tons of e-waste will.
That's why I believe lead solder is still used in the aerospace industry, because it is only a small fraction of all the electronics. It is very critical, you really don't want tin whiskers to cause short circuits, a problem with lead-free solder. And if needed it is easier to impose rules regarding waste management in such a highly regulated field than in mass produced consumer goods.
Wow, is that really a thing? I would have assumed they'd use leaded solder if it made for more flexible/stable connections, and that technicians would just bear increased safety requirements (masks, ventilation, etc.). Once the craft launched into space the risk of the lead hurting anybody approaches zero. Even burning up due to a failed launch doesn't seem like it would cause any appreciable damage (at least not due to lead).
I figured spacecraft design demanded the best performance and reliability, regardless of possible human impacts (e.g. RTGs and their potential to rain down on people upon failed launch).