ashaastravihitam ghoram tapyante ye tapo janaahaa |
dambhaahankaarasamyuktaahaa kaamaraagabalaanvitaahaa || 5 ||

Those people who perform horrible austerities that are shunned by laws of scripture, entrenched in ostentation and pride, possessed with the force of desire and attachment.
ashaastravihitam : shunned by laws of scripture
ghoram : horrible
tapyante : perform
ye : those who
tapaha : austerities
janaahaa : people
dambhaha : ostentation
ahankaaraha : pride
samyuktaahaa : entrenched
kaamaha : desire
raagaha : attachment
balaanvitaahaa : possessed with force
Let us imagine that you are attending a class on basic electronic circuits. It is your first day in the electronics lab. If you have a good teacher, chances are that they will not start day one of the class with the topic of electronics itself. They will probably talk about the dos and donts of handling electronics equipment. This is because they have your safety and the safety of other students in mind. Shri Krishna, teacher extraordinaire, uses this shloka and next to give us a warning before delving into the topic of analyzing the texture of our faith.
This warning is very simple. Any time we see people abuse and torture themselves or others in the name of devotion, physically or mentally, we need to stay away from such people. Or, in the rare chance that we have been misguided by someone to do such things, we should immediately stop. Such torture could be something as basic as denying oneself food and water to the detriment of one’s health, or could be as terrible as poking and prodding oneself with pins and needles. None of this is sanctioned by any scripture.
So why would someone perform such painful austerities? Shri Krishna says many of these people have some misguided pride about some body-oriented feat such as walking on hot charcoals. They want to put on a show so that they can satisfy the urge of ostentation, to show off their feats. Some others become so attached a worldly goal that they take on vows of incessant fasting without taking their health into consideration. Broadly speaking, such people do not gain their result, and end up harming themselves and others around them.