In general,the Scriptures say that Puja/worship/Japa done without mindfulness are not at all fruitful.
For example,the Kularnava Tantra says:
Success in japa lies in his hands who is decked with fragrant flowers,
ornaments and clothes. Devoted to the Mantra, with life dedicated to
it, with mind centred upon it, wholly given to it, following its
meaning and meditating upon it, do Japa of the Mantra.
It further says:
Bhakta: Because by his adoration, bhajanat, with supreme devotion,
with his mind, speech, body and action, kayakarmabhih, he crosses,
tarati, all miseries, he is called bhakta..
So.a Bhakta or a true worshiper should have his mind fixed on the Deity.
In fact,in a ritualistic Puja the first Upachara(step) is called the "Dhyanam" or "meditating upon the Deity".This only indicates that,in a Puja, the first requirement is to fix one's mind on the Deity who is worshiped.One's mind should focus only on the Deity and nothing else during the whole course of the Puja
When the mind is unsteady,thinking of something else,little benefits does one accrue by performing rituals or by resorting to external modes of worship.This is reflected in the following verse from the Garuda Purana:
yŸvan-no manasaÅ sthairyaÄ na yŸvac-chŸstra cintanam | yŸvan-na guru
kŸru®yaÄ tŸvat tattva kathŸ kutaÅ || 2.49.97 || As long as the mind is
unsteady, as long as one does not meditate upon the import of the
Scripture, as long as one is devoid of the blessing of the Guru, there
is little interest in talk of Ultimate Reality
The Kularnava Tantra further states:
Should you be absent-minded, call one Deity and worship another, you
shall receive the curses of both. Each Deity is to be received with
the honour that belongs" to it, with the Mantra that is proper to its
So,being absent minded or thinking of something else during Puja is an offence in itself without doubt because by being absent minded or by thinking about something else during Puja one is not showing the respect that the Deity deserves .
Further quotes from Kularnava Tantra:
Much more than the material side of the worship, the upasaka has to be
careful of his psychological state of mind and soul.
If the mind be in one place, Shiva (passive consciousness) in another,
Shakti (active consciousness) in another, and life-breath in still
another place, even a crore of japa is useless.
So,doing a Puja with full one-pointed concentration is required in order to reap the full merits of the Puja.And ,understandably,concentrating the mind is easily the toughest job in the whole process.That's possibly why it is the first step(viz;Dhyanam) in a Puja.