Scientific research (Brenner & Zacks) observed that walking through doorways interferes with memory, facilitates forgetting. More specifically: the “doorway effect” is a theory based on the fact that retaining a memory is more difficult after literally walking through an actual doorway (to another room, the outside, the other lecture hall, in or out the church, a stage door). It appears that memory works better when remaining in the room in which it originally captured the information, and that one loses some of the information when walking out of the room - in real locations (like your practice room, the university, a museum, a shopping center, the green room) as well as in virtual reality simulations (like an Avatar program at DARPA; or Skyrim, the Sims, or Destiny on PSX). It’s called the “encoding specificity” principle and suggests that memory organizes information (amongst other things) ‘location based’ (exterior).
From a pedagogical point of view: personality preventing productive piano practicing is preposterous - before the after - and utterly undesired.
Therefore I advise the following (as it is a “path dependent” process): first practice with focus and purpose, and only then give sway to the weakness of spirit and flesh.
See: 182 • Disciplina
The pianist inhaled expressively at the first note and did not exhale until the last; the music turned blue and eventually fainted.
"When the piano likes me, I touch it. When it doesn't, I don't."