TL;DR: People think the Millennium Falcon is a piece of junk because... well, because the Millennium Falcon is a piece of junk.
Update: Disney Canon:
The terrible Aftermath canon novel series sheds some light on this. Norra Wexley was a rebel pilot, and escorted the Millennium Falcon into - and out of - the second Death Star during the Battle of Endor. Flying alongside it in a Y-Wing, she had been extremely impressed with the Falcon.
In Star Wars: Aftermath: Life Debt, she finds herself aboard the Falcon, sitting in Chewbacca's seat, and she is absolutely horrified.
The Falcon slices through hyperspace.
“You look nervous,” Han says to Norra, sitting in the copilot’s chair— a chair that has a very deep seat and is lower to the floor than the other. A chair worn most often by a much bigger individual.
Like, say, a Wookiee.
“I’m not nervous,” she says.
She’s nervous. It’s hard not to be. She’s admired this ship a great deal from afar— how could she not? This should be a clunky, junky freighter. But she’s seen it move. The way it whips and dips through the chaos of battle is a thing to behold— performance like that steals your breath just watching it. She in her Y-wing followed the Falcon— then piloted by Calrissian and his Sullustan copilot— into the mazelike innards of the second Death Star. It was a thing to marvel. A sight she will never forget.
That’s from the outside.
On the inside? She’s surprised this thing holds together. It’s got the structural integrity of a sack of spare parts. Nothing matches. Things dangle. Wires lie exposed. Panels don’t match their moorings. The console doesn’t even look original to the ship— it’s like her son built it in his workshop back on Akiva. Bits sit welded to other bits or, worse, are stuck together with wound-up wads of bonding tape and shellacked over with shiny epox.
Norra is afraid this thing might break into pieces right here in the middle of rocketing through hyperspace.
Solo, for his part, seems like he’s embraced the chaos of it. Sometimes an alarm goes off, or part of the dash goes dark— and then he pounds it with the side of his fist or jiggles the wires hanging underneath. Then it all comes back online. He smirks and winks.
Norra, in order to not talk about the orbital garbage fire in which they are currently traveling, says: “We sure Aram gave us good info?”
- Star Wars: Aftermath: Life Debt
Even Chewbacca gets it:
When the boy from Tatooine, Skywalker, had seen the Falcon for the first time back in Mos Eisley, he’d described it as “a piece of junk.” Solo had taken it personally, but the Wookiee could understand why Luke had thought so. He didn’t agree, of course, but he understood. The Falcon looked like just another Corellian YT-1300 light freighter, and there had to be thousands, if not hundreds of thousands, of them in service throughout the galaxy. Her cockpit, for reasons no one but the designers back at Corell Industries could understand, was posted to the starboard side, and jutted at an odd angle instead of being mounted on the center line. Her engines were overpowered for her size, but her controls were so sensitive as to be paranoid, which meant she was temperamental and needed a pilot and copilot to manage her in flight. Even then she was liable to slip out of control if both operators didn’t know exactly what they were doing.
That was just the YT-1300 series as a whole.
But the Falcon took all those characteristics and multiplied them exponentially. She was bruised. She was dented. She needed paint and near-constant maintenance. Easily half the money they pulled in doing runs for Jabba the Hutt or whoever else went to upkeep, new parts, fuel. She drank fuel like she’d been wandering the Dune Sea for weeks without water. Her gravity emulators had an annoying— and, frankly, alarming— tendency to cut out during sharp maneuvering, which would send you across the cabin if you weren’t strapped in when it happened. The multiple computers that worked to keep everything on the ship running in concert not only had developed, over the years, their own dialects, but at times seemed to feud among themselves. And you didn’t want to get the Wookiee started on the state of the ion flux stabilizers, or the way the Duvo-Pek acceleration compensators would not just seek to compensate but would instead do precisely the opposite.
- Star Wars: Smuggler's Run: A Han Solo and Chewbacca Adventure
The Falcon is like a crappy old 1910 freight truck with an insane number of modifications, and the engine of a modern high performance race car. This causes all kinds of problems, which require an endless succession of repairs and jury rigged quick fixes. This wouldn't be so bad, if the guy responsible for most of the work wasn't Han Solo:
And Chewbacca is great and all, but he did put C-3PO's head on backwards.
These two dudes are awesome characters and great pilots, but they aren't the best mechanics in the galaxy.
As has been pointed out before, the Falcon is frequently in very bad shape in the original trilogy:
Percussive maintenance is used so often on the Millennium Falcon that it was one of the predictions in Darths And Droids: The Force Awakens Bingo.
Han Solo used [percussive maintenance] to fix a sputtering Millennium Falcon, in The Empire Strikes Back. Given the general state of the ship and Han's personality, it's a minor miracle that he only does this once.
In the Expanded Universe, he does it often enough that he and Lando (the Falcon's previous owner and one of Han's best friends) refer to it as "Emergency Repair Procedure Number One".
- TV Tropes
Han isn't the only one who subjects the Falcon to physical abuse in the name of repairs:
Chewbacca and Solo spent hours modifying and tinkering on their beloved Falcon, souping it up far beyond its original performance specs. Although the Falcon's upkeep was a labor of love, many a time Chewie unleashed his legendary temper on the recalcitrant freighter, banging his massive furry hands against delicate components that refused to behave.
And there has been a lot of work done on the Falcon, giving both Han and Chewie plenty of chances to smash the hell out of it:
All of [the Falcon's] modifications come at a price. They haven’t been professionally installed and, while Solo and Chewbacca generally have a handle on things, the huge amounts of unlicensed components have made for a ship that’s almost constantly under maintenance.
- Screen Rant
Which causes problems, because Han is the worst mechanic ever:
Han knows that the only things keeping the Falcon in one piece is duct tape and positive thoughts:
Leia: [to Han] We've lost lateral controls!
Han: [to Leia] Don't worry, she'll hold together!
Han: [quietly, to the Falcon] Come on baby, hold together!
- A New Hope
As does Lando:
You know, that ship's saved my life quite a few times. She's the fastest hunk of junk in the galaxy!
- The Empire Strikes Back
And this is confirmed on the Star Wars Databank website:
Despite her humble origins and shabby exterior, the Millennium Falcon has played a role in some of the greatest victories of the Rebel Alliance and the New Republic. The Falcon looks like a worn-out junker, but beneath her hull she’s full of surprises. A succession of owners, from Lando Calrissian and Han Solo to Gannis Ducain, have made special modifications that boosted the freighter’s speed, shielding and firepower to impressive – and downright illegal – levels. The price of such tinkering? The Falcon can be unpredictable, with her hyperdrive particularly balky.
- Star Wars Databank
And numerous other sites, including Wookieepedia:
The cobbled-together nature of the ship presented many problems throughout her smuggling days and during the Galactic Civil War. Systems were barely held together and apparently had many incompatibilities, resulting in numerous malfunctions. C-3P0 commented that he wasn't quite sure where the ship learned to communicate... Years after the Battle of Endor, Han Solo and/or Chewbacca appeared to have resolved these difficulties, much to the relief of Leia Organa...The resolution of those problems may have involved a virtual rebuild of her internal operation systems; this was never discussed in detail.
In an effort to reduce his expenses and maintain his privacy, Solo modified the Falcon so that most of her major systems could be accessed through the cockpit or the engineering station in the main cargo hold. The myriad of ship control functions were funneled through what was once a Hanx-Wargel SuperFlow IV computer. It has since been modified with three droid brains, which caused the Falcon to have schizophrenic arguments with herself.
The Falcon's unkempt interior matched her dilapidated exterior. The interior corridors were littered with all sorts of mechanical gear.
In fact, a real life engineering company has said that the Falcon's unreliability must make her upkeep and maintenance costs astronomical (no pun intended):
SGS Engineering, a UK company specializing in hydraulics, did the calculations and figured that Han Solo must have a considerable fortune stashed away somewhere.
The engineering firm took the Millennium Falcon out of its fictional universe and treated it as if were a real vehicle in our world. SGS worked out that it would cost over $3 million (about £2 million, AU$4.2 million) just to keep the spaceship up to date on repairs and maintenance for a year. And that's for a "good year," not counting the toll taken by hiding in asteroid fields or fighting the forces of the Empire.
SGS cites the Falcon's reputation for being unreliable along with its age (over 50 years) when sorting out the cost of parts and labor to keep it flying as the fastest ship in the galaxy. The figure is based on data taken from the annual maintenance costs of commercial jets, fighter jets and labor rates from our real world.
"Anything mechanical that is known as a hunk of junk is going to be expensive to upkeep," notes SGS owner and founder Andy Wyatt. "We're not professing that these are definitive calculations, there is a certain amount of conjecture in there -- after all there's not much to base a replacement hyperdrive on -- but they do give a good idea of just how much of a financial burden the Millennium Falcon would have been on Solo."
Out of Universe:
People think the Falcon is a piece of junk because it looks like a piece of junk, and it looks like that because Lucas wanted it to. He didn't want to make another pristine science fiction movie, he wanted his world to look real and lived in; a smuggler's cargo ship in such a world would look battered and beaten up, not nice and pretty.
[Lucas] didn't want anything [in Star Wars] to stand out, he wanted it all real and used. And I said, "Finally somebody's doing it the right way." All science fiction before was very plastic and stupid uniforms and Flash Gordon stuff. Nothing was new. George was going right against that. My first conversation with him was that spaceships should be things you see in garages with oil dripping and they keep repairing them to keep them going, because that's how the world is. So we had the conversation and I got hired. I was the third person hired on Star Wars, in fact.
The Millennium Falcon was difficult, because I had to train prop men to break down jet engines into scrap pieces and then line them all up into different categories and stick them to the walls.
- Esquire interview with Roger Christian, who designed the Falcon
It was always Christian's intention for the Millennium Falcon to "look like an old car that had been repaired many times, rugged and dripping with oil." And in creating Solo's second-hand smuggling vessel, he took a very literal approach.
"The cockpit was the first set we ever build," says Christian. "I just kept having to buy more and more junk. It was eating it up. ... Then I gave the set a spray to make it look grimy.
- CNN interview with Roger Christian
This is part and parcel of the "Used Future" Lucas helped to create, as TV Tropes explains:
Of course Star Wars more or less defines this trope, where every ship is covered with dings and scratches, and [the trope is] epitomized by the Millennium Falcon, which looks like it is almost ready to fall apart. This extends to the sound design as well, apparently George Lucas's instructions were that he wanted to hear every loose bolt in the engines.
- TV Tropes
1 "Percussive maintenance" is a tongue-in-cheek term used to describe the act of 'repairing' something by smacking it as hard as possible.