Poverty is not a shame, but the being ashamed of it is.
贫非耻,耻贫乃耻。
Apparently what happened was that water collected on these tar pits, and the bigger animals like the elephants ventured out on to the apparently firm surface to drink, and were promptly bogged in the tar.