'Fraid you're mixing apples and porcupines here (oranges are too close to apples for consideration).
The first key point is that the F-35B made an emergency landing at a civilian airport that's not equipped to handle military jets, let alone something as sensitive as the F-35. Priority #1 as soon as this emergency was declared was getting a team out to the jet to guard it...that's not something that happens with ANY civilian airliners. Just getting that team out to protect the aircraft can take some time, particularly when it's on the other side of the world from your single main operating base (RAF Marham).
As
E
EwenS
notes, we have no clue about the nature of the issue. An awful lot of airliner issues get hidden from the public. A number of years ago, we were flying from the States to the UK when the aircraft made a precautionary landing at Shannon Airport, Ireland. The airline arranged alternative flights from Shannon to get the passengers to their destinations...but we never boarded our original jet again. That model and approach doesn't work for a stranded F-35.
Yes, airlines have a MEL but some issues can't be fixed, even with that list. Airlines have a sufficient number of airframes that they can work around major maintenance issues, albeit with delays for the passengers...but, again, an airline's top priority is getting its paying passengers to their destinations. The military can't do that, particularly with much smaller fleets. I got stuck at Washington National about 10 years ago because of a maintenance issue on our airframe. National wasn't a main hub for this airline so they asked other airlines that used the airport but none had the right part. They ended up flying in a replacement part from Atlanta (which airlines can do because they have regularly-scheduled flights...the military doesn't). The part eventually arrived and we all boarded the aircraft in anticipation. As we all sat there, the maintenance tech walked through the cabin to fit the part...it was a plastic cover for the exit warning lights in the cabin ceiling. He literally walked through the cabin, clicked it in place, and walked off...and for that "maintenance issue", we waited 10 hrs.
"Just in time" spares supply, coupled with small fleet sizes, can also be a major issue for the military. I recall many moons ago the RAF sent a sizeable force to Malaysia to participate in Exercise Flying Fish. Key to the whole force was an E-3D Sentry which brought a sizeable team from RAF Waddington. All arrived safely, got settled and then briefed for the first mission. The E-3D taxied out, trundled down the runway and took off only to be hit immediately on the nose cone by a large bird. Cue an extensive orbit dumping fuel followed by a return back to the airfield. It took weeks just to get a spare radome out to Malaysia because the E-3D fleet operated a "just in time" spares contract...meanwhile, the crew had a paid holiday in Malaysia (lucky buggers!). Again, in a civilian airliner context, an airframe that suffers a serious birdstrike is simply taken out of service and replaced by another airframe...you can't do that with a limited fleet size (the RAF only had 7 E-3Ds).
All that said, 5 weeks is still far too long a time to return the aircraft back to flying condition. However, I suspect the issue has less to do with the F-35's maintainability and more to do with the remote location and the financial limitations of the UK MOD.