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 yajna is not a secular act. It is a very holy act, rarely done. One performs yajna 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 sastras’ exhortations should be adhered to. That alone brings spiritual touch and feeling.
But in tāmasa yajna, 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 yajna. 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 yajna, are to be properly gifted. Faith, attention and care should be evinced in the whole performance. In tāmasa yajna, these are not done, making the whole pursuit a sheer indulgence in delusion and hypocrisy. The performance becomes unholy and degenerating.