I think the answer can be summed up in what John the Baptist says regarding Jesus in John 3:30:
"He must increase, but I must decrease."
That is to say, the Gospels were not primarily about bolstering confidence in the disciples, but rather about telling the truth about and bolstering confidence in Jesus.
In other words, I think you partially answered your own question, when you said, "If they only cared to look better and show later Christians that "the group you are joining is the best", they wouldn't have included these unflattering descriptions about themselves."
That's just the point, they weren't only trying to show later Christians that they group they are joining is the best. They were telling the truth, and leaving it to the reader to decide whether to accept the truth or not.
That which was from the beginning, which we have heard, which we have
seen with our eyes, which we looked upon and have touched with our
hands, concerning the word of life— the life was made manifest, and
we have seen it, and testify to it and proclaim to you the eternal
life, which was with the Father and was made manifest to us— that
which we have seen and heard we proclaim also to you, so that you too
may have fellowship with us; and indeed our fellowship is with the
Father and with his Son Jesus Christ.
The entirety of the Gospels is written to depict the interaction of God with the interaction of fallen, feeble, and confused human beings, so let me answer the question with a question: How could the authors have demonstrated Jesus's patience and love for immature and confused people without showing their sinfulness, immaturity, weakness, and confusion?
The answer is, they can't. The greatness and wisdom of Christ can only be seen clearly against the backdrop of the sinfulness and short-sighted nature of people. Take away the immature sinful behavior of the disciples, and all you have is a set of smart, perfectly kind, loving people talking about smart, perfectly kind, loving things in complete agreement with one another.
Without conflict, there's no story.