Malmö and Hammarby are not rivals in any sense of the word either, more than that they play in the same league. There is no particular history between them as far as I'm aware, both competed for the title this year, but that's about it. Of course Ibrahimovic is closely linked with his hometown Malmö and their team, so him wanting Hammarby to be the biggest scandinavian club is not welcome I suppose, but the reactions to him buying a stake in Hammarby seems overblown.
It's more of a Malmö-Stockholm thing rather than any particular club. Scania has a complicated historical relationship with the capital, dating back centuries to the way Scania was annexed from Denmark, so anything "Stockholm" equals "bad" in the eyes of Malmöites, but even more for rural Scanians that are very conservative unlike the more left-wing and multi-ethnic urban Malmöites. The only thing unifying modern-day Malmö and rural Scania is the common repulsion for Stockholm and the support for "Di Blåe" (the blues, Malmö FF). They're nicknamed "Skånelaget" (the Scanian team) for a reason.
Malmö-Stockholm may be a bit like Liverpool-Manchester in a way, but the geographical distance makes it a bit more complicated than that, especially since where "Manchester" lays, is one gigantic "Cheshire plain" with only small towns. The regional rivals Helsingborg are rather irrelevant as a club nowadays as well, overachieved their size some to win the 1999 and 2011 titles, but are in perpetual financial meltdown and a bottom feeder in the top-flight. That means Malmö fans don't regard them as a threat no more, looking towards Stockholm and close to a one-hour flight away instead.
I'd say it's more the symbolism of the whole thing, that a club that have crawled on their knees for Zlatan, he spits in the eye like that and buys a Stockholm club of all things. Had he invested in a club not from Stockholm or one of Helsingborg/Gothenburg, I don't think anyone would've cared much at all.
Another thing that has made people see red is the timing of the whole thing.
Tonight, Malmö's captain and fellow attacker Markus Rosenberg makes his final home appearance for the club against Dinamo Kyiv. He's one year younger than Zlatan and also got through the youth ranks. After he returned home at 31, he was the star man in three league titles and two Champions League group stages, so his status among Malmö fans was already higher than Zlatan's, which makes people suggest that Zlatan chose this week just to rain on Rosenberg's parade. It really was released in the worst manner and time possible to make me suspect that too. Zlatan definitely is a very fickle individual and much smarter than people give him credit for. I'd say it was on purpose to do it this week.
Think of it a bit as some Scouse player buying into Spurs, Chelsea or maybe Man City the very day before Stevie's final Anfield game.
The thing about Hammarby is that as a club they're historical underachievers. Besides their shock 2001 league title they've won nothing at all, but they have a fanbase that's very large and really high average attendances by Swedish standards. It's not like a club that's vastly smaller than Malmö in terms of those things.