Even in my lifetime - I'm 44 - the growth in wealth in Norway has been astounding.
Ironically, for example, whale meat is something I remember from my childhood as a cheap meat substitute (but that is now an expensive "delicacy"; we never saw it as a delicacy then - it is tough and oily) because my parents despite both having good jobs could not often afford beef in the early 80s. Even then we'd usually have it only once a week.
When I was a kid, a packed lunch was an economic necessity for many families.
This was also in some sense exacerbated by more income equality: eating out is relatively expensive in Norway because serving staff are also paid reasonably well.
But I think the main reason the matpakke has survived is basically that this was much closer to the norm a lot of places with low population density (~13 per square kilometer in Norway) berfore urbanization and well into early industrialisation and that Norway also for a long time was very severely lutheran, with a puritan streak. Even if you have money, showing it off is not the done thing.
Every rich country was once very poor relative to its current status though. This doesn't change the fact that Norway was not poor relative to other European countries at the time.
Here's an Italian movie from the 1970s, showing a family in a large slum around Italy.
I was surprised by that statement and had to look it up and it was, of course, false. Norway was a wealthy country back to the 1800s: sources: https://medium.com/@Jernfrost/no-norway-was-not-a-poor-count... and https://eh.net/encyclopedia/the-economic-history-of-norway/