The verse says that a man cannot enter a place of worship if he is carrying either money to pay for a prostitute or to buy a dog. Money for such purposes is considered to be an abomination. It is not money that is the problem, it is the intended purpose for that money. The same as nowadays, people like owning dogs, but in those days that was considered to be something that would offend God.
As a matter of interest, a cat is the only common animal that is not mentioned anywhere in the Bible and there were cats all through the Biblical lands. Egyptians liked them.