'Temple' was originally a sacred rectangle of sky marked for reading omens — from PIE *tem- (to cut).
A building devoted to the worship of a god or gods, or any place regarded as the dwelling of a divine presence.
From Old English 'tempel,' borrowed from Latin 'templum' (a sacred precinct, a space cut out by augural observation, later a building). The PIE root is *tem- (to cut). A 'templum' was originally not a building but a sacred rectangle: the space the Roman augur cut or traced — with a staff — in the sky or on the ground, within which he would read the flight of
Latin 'contemplari' (to contemplate) literally meant 'to gaze together at a templum' — the augur's sacred observation space. Thinking deeply and visiting a temple share the same etymological root because both originally involved staring at a consecrated rectangle of sky.