lead tastes sweet, sugar wasn't cheaply & widely available, honey is expensive etc.
and knowledge about lead poisoning was not really a think AFIK
at the same time lead pipes tend to gain a crust of chalk over time (depending on chalk content of the water) which mostly defuses their danger. Like you will find some very old houses with lead tape water pipes in the EU today but if you test their tape water you won't find (much of) an issue due to 1) the chalk 2) the water not staying long in the pipe if it's e.g. a 4 apartment house.