My DS1 (8yrs old) often wants to quit things when he is upset - I try to uncover the specific problem, without saying yes or no to the quitting idea until we have talked more, at a time that's less emotionally-laden than going to/coming from the event. If the event is going on that moment (e.g. soccer practice) he can sit by me and watch his teammates, but we are not leaving until it's over. I also tell him he has to tell his coach that he's going to sit out - often that conversation is enough to get him started participating again. If he doesn't want to sign up for that activity again next time it's generally his choice, but we will go to the events we committed to go to.
Quitting is DS' idea of how to solve a problem, but I usually think there's a better solution if we can figure out what the underlying unmet need is. Open questions help - "What are two things you don't like about it? Is there part of it you do like? If we changed [insert specific complaint here] then would you like it?" Obviously if he is being harmed in some way I would make some immediate change, but even then it might mean making a specific plan with the adult(s) involved rather than quitting right off the bat. If it seems to me he is really not ready for the offered set-up we sit out until another season. When he got too old for me to be in the swim lesson with him at the Y, he took two years off from swim lessons and then started again. If he really is not being served (lousy teacher, wrong difficulty level) I chalk it up as my own mistake and either try to fix it or eat the cost.
My take on this comes partly from knowing my son - that he jumps quickly to the first solution he thinks of, and that he makes better decisions for himself when the anxiety is defused and he has more ideas to choose among - and partly from trying to counteract the consumer culture that cuts us off so insidiously from other human beings. When we "turn off" an activity because it has become boring or uncomfortable, we treat that activity like a TV show. That means we are treating ourselves like spectators, or consumers, rather than participants, or members. We are treating the other people involved as entertainment providers or co-spectators. Because I think our whole society pulls toward this extreme, I generally pull in the other direction. Also, my son is very capable in advocating for his self-determination needs, so I offer balance by advocating for his social needs (belonging, making a contribution, being known and appreciated, being trusted and trustworthy) and helping him find ways to succeed in these areas. "I'm bored" or "I just don't like it" often means one or more of these social needs is going unspoken and unmet.