Lead contaminated water

Plumbum is the Latin word for lead. It’s also the root of the term, plumber. Part of President Biden’s infrastructure bill proposes to remove the last of our country’s lead pipes. But why do we have lead pipes anyway?