At a glance, it looks like weather and population density are some dominating factors. Interesting that people are very unhappy in Tokyo. Probably some food for thought for people promoting greater living density, there. Sample size of 500 in each perfecture is potentially problematic, however.
Osaka seems to be in top 20 despite having >10k people/km2
Akita is dead last with <100 people/km2
Akita is quite northern and Osaka is quite southern, which aligns with the climate hypothesis, so there's that. Anyway, it's just a hot take based on a glance at a visual aide for the article.