It is often argued that "temple worship" outside of Jerusalem was beyond the boundaries allowed by the Torah (or Pentateuch). H.L. Ellison, however, argues that this argument is relative:
The dominant view both in Jewish and Christian circles that passages like Deut. 12:5-7, 11-14; 16:2; 26:2 demand one exclusive central sanctuary is probably incorrect. A comparison of Deut. 12:14 and 23:16 (Heb. 23:17) will show that the language used need not be given a purely exclusive interpretation. Josiah' s action in leaving Jerusalem as the only operative shrine may just as well have been motivated by his feeling that only so could he finally stamp out idolatry and corrupt religion. It is far more likely that though there was a central sanctuary at which the Ark of the Covenant was lodged, there were a limited number of other lawful sanctuaries, which had been marked out by Divine appearances or theophanies. In addition there were the many illegitimate "high places". Though we know of no such theophany at Shiloh or Gibeon, we need not doubt that there had been one. It should be noted that while there was doubtless a sanctuary at Samaria itself, in the absence of any well-authenticated theophany it was never able to displace Bethel as the leading shrine of the Northern kingdom.
It was not the building, or even the ritual furniture, at a sanctuary that made the place holy, but the appearance of God or of the angel of the Lord (Jdg. 6:11, 2 Sam. 24:16-18) had left a virtually indelible quality of holiness there--natural phenomena would normally account for the choice of "high places". This holiness persisted whether or not men continued to worship there, so the Israelites after the conquest of Canaan could restart their worship in the places where the Patriarchs had left off centuries before. This holiness was not affected by the destruction of buildings and altar, cf. 1 Ki. 18:30. The story of Josiah at Bethel and the other sanctuaries of Samaria (2 Ki. 23:15-20) shows how a holy place could be profaned, i.e. made common ground once more.
H.L. Ellison, From Babylon to Bethlehem: The Jewish People From the Exile to the Messiah (London: Paternoster Press, 1976), 63