It depends on the tax treaty. A tax treaty is no magical solution to all your problems, but it does offer additional protection because it limits the taxes a country can charge. With no treaty, it does not matter if you have substance in the other country.
How can home country tax me if I don't have a house in home country, I don't have a wife or kids there, I am not employed there and I don't live there?