You have to take the whole chapter into account when you read this verse. Otherwise, you are taking this verse out of context. Paul here is criticizing the Corinthians for speaking in tongues without an interpreter.
Let all things be done unto edifying." (1 Corinthians 14:26).
Here are the commands for speaking in tongues:
- Let him that speaks in an unknown tongue pray that he may interpret. For if I pray in an unknown tongue, my spirit prays, but my understanding is unfruitful (1 Corinthians 14:13-14).
- If any man speak in an unknown tongue, let it be by two, or at the most by three, and that by course; and let one interpret. But if there be no interpreter, let him keep silence in the church; and let him speak to himself, and to God (1 Corinthians 14:27-28). The spirits of the prophets [the speakers in tongues] are subject to the prophets [the interpreters]. For God is not the author of confusion, but of peace, as in all churches of the saints. (1 Corinthians 14:32-33).
Prophesying is done for the purpose of edifying the church.
"But he that prophesieth speaketh unto men
to edification," (1 Corinthians 14:3).
But he that speaks in an unknown tongue speaks to edify themselves.
"He that speaketh in an
unknown tongue edifieth himself; but he that prophesieth edifieth the church." (1 Corinthians 14:4).
"Even so ye, forasmuch as ye are zealous of spiritual
gifts, seek that ye may excel to the edifying of the church." (1 Corinthians 14:12).
Paul is telling us to seek to edify the church and not to edify ourselves.