It's old wisdom from way back when soap was made from lye.
That kind of soap is much harsher and can dissolve the seasoning, which is just a bunch of layers of polymerized oil that protects the metal from rust and gives it a glossy, almost non-stick coating.
Modern dish soap is nowhere near that harsh and is completely safe to use on a seasoned cast iron pan. It's just that your grandparents and great grandparents beat that lesson into their kids and it stuck.
Cast iron is fine to cook on, but I much prefer stainless steel. It's a bit harder to get the results you want, but it's way easier to maintain.