Yajña done without heeding the rules and procedures śāstras lay down, with no food distributed to those around, without reciting the necessary mantras, without giving adequate dakṣiṇā (offering to priests, etc.), lacking in attention and application, is considered tāmasa.
Vedic yajña is not a secular act. It is a very holy act, rarely done. One performs yajña with a view to inculcating in himself as well as others around a good measure of divinity and sublimity to elevate the inner being. For this, the śāstrās’ exhortations should be adhered to. That alone brings spiritual touch and feeling.
But in tāmasa yajña, all these are totally neglected. No rules and procedures are properly and attentively observed. Feeding people lovingly with good food is an integral part of yajña. If this is shunned, or not done with love and care, then the performer will not have the sublime effect of the performance.
Similarly, the priests and attendants whose role is essential in the yajña, are to be properly gifted. Faith, attention and care should be evinced in the whole performance. In tāmasa yajña, these are not done, making the whole pursuit a sheer indulgence in delusion and hypocrisy. The performance becomes unholy and degenerating.