1 Corinthians 14:13-19 (ESV):
13 Therefore, one who speaks in a tongue should pray that he may interpret. 14 For if I pray in a tongue, my spirit prays but my mind is unfruitful. 15 What am I to do? I will pray with my spirit, but I will pray with my mind also; I will sing praise with my spirit, but I will sing with my mind also. 16 Otherwise, if you give thanks with your spirit, how can anyone in the position of an outsider say “Amen” to your thanksgiving when he does not know what you are saying? 17 For you may be giving thanks well enough, but the other person is not being built up. 18 I thank God that I speak in tongues more than all of you. 19 Nevertheless, in church I would rather speak five words with my mind in order to instruct others, than ten thousand words in a tongue.
Verse 16 talks about the concept of "giving thanks [to God] with one's spirit" and verse 17 says "for you may be giving thanks well enough", which seems to indicate that the practice, in and of itself, is perfectly fine. However, the problem arises when this thanksgiving takes place in the presence of other people, who get no benefit from it because they are unable to understand what's being said (v16: "[...] when he does not know what you are saying"; v17: "[...] but the other person is not being built up"). To me, that's the reason why Paul, in verse 13, recommends that a person with the gift of tongues should pray for the gift of interpretation too, so that they may interpret what they themselves are saying for the benefit of others who may be listening.
However, this has an intriguing implication: if a person does not pray that they may interpret, then it follows that it's entirely possible for a person to have the gift of tongues but be lacking the gift of interpretation (because they haven't prayed for it yet). Such a person would be able to give thanks in an unknown tongue, but they wouldn't be able to interpret it, which means that they would not be able to understand what they themselves are saying and much less be able to interpret it for others. This corner case is what Paul appears to be describing in verse 14: "For if I pray in a tongue, my spirit prays but my mind is unfruitful" (i.e. "I don't know what I'm saying").
Question: What's the value of giving thanks in an unknown tongue when the person doing the thanksgiving lacks the ability to interpret what they themselves are saying? Why would God give a person the ability to "give thanks in an unknown tongue" but withhold the gift of interpretation? Why not always give both gifts simultaneously and the problem is solved?