Newt crosses the Atlantic Ocean in a Muggle steamboat, bringing his suitcase of creatures, so he could return Frank the Thunderbird to his native habitat. We see from his encounter with Muggle customs when he got off the boat that the latch on his suitcase was faulty. Especially considering the contents of his case, why didn't he fix the latch somehow. I know he ties it with rope at the end, but why didn't he do anything about it before that?
It's on his "to-do" list.
Let’s take a moment to talk about Newt’s case, which boasts some serious Extension Charms along with a handy ‘Muggleworthy’ setting. What he’s done with the interior is truly remarkable: not only has he created a portable animal kingdom, but he’s also got the herbs and potions at hand to whip up a remedy should someone suffer a nasty bite. We’d say Newt’s thought of everything… although he really should look at getting that lock fixed.
He makes the same point to the Customs official at Ellis Island.
CUSTOMS OFFICIAL: Livestock?
The catch on NEWT’S case flicks open again. NEWT looks down and hastily closes it.
NEWT: Must get that fixed – ah, no.
It'd be futile.
He keeps Bowtruckles, which are fantastic beasts that pick locks. We learn in the movie that they're very good at picking locks, so much that Gnarlack wants to buy one from Newt for that purpose. They'd open the lock of his suitcase no matter how he fixes it.
He may have only realized the lock was broken at customs.
Newt looked surprised when the latch popped open during his encounter with Muggle customs. This isn't necessarily proof that it didn't happen before, but it's entirely possible that it's the first time it happened. It's possible that the latch was fine when Newt left, but by continually trying to escape the suitcase and look for shiny things, the Niffler eventually weakened the latch. The Niffler was determined to escape to search for more shiny things, and could have been trying to escape for a while, until the latch finally became weak and broke. If the latch seemed strong before, Newt might not have expected that it could break.
This quote shows that the Niffler is the creature responsible for opening the case at least once:
A smartly dressed man flips a dime towards a beggar sitting on the steps.
CLOSE ON the dime, falling in slow motion.
MARY LOU (O.S.) Hear my words and heed my warning . . .
ANGLE ON some little paws, which have appeared in the narrow crack between the lid and the body of NEWT’S case.
ANGLE ON the dime hitting the steps with a musical clang.
ANGLE ON the paws, now trying hard to prise open the case. - Fantastic Beasts and Where to Find Them: The Original Screenplay
That clearly shows the Niffler was trying to escape from the case to collect shiny things. It seems likely that the Niffler could have been trying to escape before, and causing the latch on the case to weaken and eventually break. In addition, until Jacob had the case, the Niffler was the only creature to seem interested and persistent in his attempt to break out of the suitcase.
In addition, once he realized the Niffler was able to escape, he didn't really have much time to do anything about it. He had to track down the Niffler, then find a Muggle, retrieve his case, and then recapture all the creatures that escaped - all while MACUSA is trying to find something creating chaos in New York and suspects Newt is the reason behind it. Keep in mind, as well, even with a faulty latch, the only creature that actually escaped while Newt still had the suitcase is the Niffler, and while Newt had the suitcase, he was able to catch the Niffler and put it back.