Mallory and Harold owned a dormitory. A place where people in the small town could rent a room or so at an affordable price, especially while they worked near or within the Castle of Hearts. The town itself did thrive and the majority did work on their own individual jobs. A good example was Nicholas Hatter's shop and such, but it was still related to the crown.
Farmers who harvested their crops often sold it to the Castle first, and Fishermen from nearby towns did the same. Well, it was something that one didn't think too hard that much, most were content to live their days in peace.
As long as they were unaffected by troubles, the people of the Hearts Kingdom were content.
Blessed with sunny days, bountiful harvest and natural resources. It was as if an everlasting spring continued to make the land prosper with little to no hard work.
Wonder facts!
Alice tells him he should not waste time asking riddles that have no answers. The Mad Hatter calmly explains that Time is a “him,” not an “it.” He goes on to recount how Time has been upset ever since the Queen of Hearts said the Mad Hatter was “murdering time” while he performed a song badly. Since then, Time has stayed fixed at six o’clock, which means that they exist in perpetual tea-time. (Sparknotes.com)
I've already mentioned this before, this inspired me to focus on how the Hatter, the Queen of Hearts and Time have some sort of history in this story heh.