You dont understand. The dog makes the house nijaas and you can't pray in a nijaas house.
Look at this:
https://islamqa.info/en/69840
Crude
Nijaas according to your islamic texts is only when the dog is wet, why not dry them and have a shower? The reason is economics.