SpongeBob: No, that we're just...kids. A couple of kids in way over their heads. We were doomed from the start. I mean look at us. We didn't even come close to the crown. We let everybody down...we failed...
Even the pirates were shedding tears over the loss of the two heroes.
SpongeBob had been around for five years when this movie came out. He was a legend. Making kids and adults alike smile. When he gets to the trench... he justgives up. The SpongeBob we all know and love, who had entertained generations with his chocolate selling antics and his fry cooking expertise just collapses, and can't go on.
Patrick: SpongeBob? [sees him walking away from the trench, defeated] Patrick: Hey, where are you going? SpongeBob: I'm going home, Patrick. Patrick: But what about Mr Krabs? SpongeBob:What about us?! WE'LL never survive in that trench! You said it yourself, this is man's country. And let's face it, Pat. We're just... kids. Patrick: We're NOT kids! SpongeBob:OPEN YOUR EYES, PATRICK! We blow bubbles, we eat ice cream - we worship a dancing peanut, for corn's sake! We don't belong out here!!
After Plankton walks into the Krusty Krab and steals the formula, there's a brief shot of frozen Mr. Krabs shedding a single tear that immediately freezes and hits the ground.
Spongebob and Patrick's reactions after learning that all their friends back home have become slaves of Plankton.
For context, the scene in which Krabs tells Spongebob that he didn't get the promotion. Spongebob's cheerful demeanor totally sinks, and he looks like his entire world has just shattered. Krabs rather bluntly (but as gently as he can) tells Spongebob that he gave the job to Squidward because Squidward is more mature than him. Krabs asks if he understands. Spongebob responds, in a broken voice, "I guess so, Mr Krabs," and slowly walks away. Krabs looks on sadly- even he feels sorry for the little guy.
In the following scene, Spongebob is sobbing at the bar because he didn't get the job. When he finally manages to calm down a bit and take a breath, Patrick congratulates Spongebob for his promotion.... prompting Spongebob to start bawling again.
Given that Spongebob is pretty goofy and child-like, his grief about failing to get the promotion comes from a pretty adult place and isn't misplaced at all. He's not just crying because of something silly like "losing" the Fry Cook Boots in the episode "Squeaky Boots." He's just experienced a very real and painful taste of life as an adult, and is possibly more disappointed in himself than he's ever been. Any adult watching this movie who's had the experience of applying for a great job only for someone else to get it will empathize with Spongebob's plight here.
Wilco's song for this movie, Just a Kid. Remember, this is chronologically the end of the series. It really hits home to fans who grew up with Spongebob during Seasons 1-3, and it also speaks to anyone who's moving on in life whether it be graduating from high school/college, moving out, getting a new job etc. The song even says "Everybody, everyone, somebody, anyone has to grow up".
Meta example: old-time Spongebob fans may have a hard time watching considering this is technically the end of the series, and was meant to be a Grand Finale, and may see the ending as the point where Spongebob (the "good"Spongebob, at least) ended forever.