I wouldn't necessarily agree that NJ is "America's 'official joke state." I would say it is the official state for a certain type of American joke. For example, Florida Man is often associated with people doing stupid/boneheaded things. West Virginia or any other of the other primarily Appalachia States are often associated with being backwards/incestuous/luddite. The mid-west/corn sates such as Iowa or Kansas are often associated with being simple and simpleminded and clueless. And these are just a few examples. New Jersey, on the other hand, has a few facets, such as arguably being culturally deficient, at make it an easy target for certain attacks.
It's geographical composition and location are at the heart of this. First, it makes the center of the New York City, Philadelphia, Baltimore/DC triangle. On the East it has ocean, on the North it has the city that never sleeps, which is a world tier financial and cultural mecca and ginormous shipping port. On the west is Philadelphia the birth place of freedom and America. It's the home of Rocky Balboa. It is a city of millions and has thriving art and merchant cultures. And it's the home of the philly cheese steak. To the south is the old town of Baltimore and D.C. the capital of the nation and to many, the capital of the world. And in NJ you have...Newark...Trenton? These are certainly nice enough places, but with both being in immediate proximity to world class cities (NYC and Philly) they pale on that comparison.
Add to that that both NYC and Philly are literally right on the edge of NJ. The heart of both of those cities is right on the water's edge directly across from NJ. That means for them to expand, they have to expand in NJ. Which means, often, the people in those areas are there to live in the city. Except, if you want to live in the city, you don't want to have to deal with the river. Which means you only live in the NJ portions of the functional cities if you cannot afford to live on the NY or PA sides of the river. There's your degree of separation and your first tier from which some can look down on others.
This also means that NJ is set to act as a support for those cities, but for much of the benefit of those cities to go to their home states and not NJ. This is why NJ is called the garden state. Originally, it had a lot of benefit acting as the food growing area for all three cities. You can't have a much better location to have a farm than right in the middle of three major metropolises. From the center it's a day to a day and a half to any of the cities (pre automobile). A farmer with any skill will have a market to sell all he/she can grow. And NJ, originally, had a lot of farms (still does really). As the country industrialized, this access to those markets meant it retained its phenomenal positioning, especially given that the ocean border meant it also had plenty of port access to receive and ship supplies. This meant that a lot of early industries were intentionally located in NJ. This in effect brought in a lot of blue collar people, which was great. NJ fed the cities, the cities grew which increased the opportunities in NJ which brought in more people and industry.
The country, however, transitioned from an agricultural/industrial economy to a primarily service economy. NYC, Philly and D.C. have phenomenal service sectors given the long standing financial, university and banking institutions located in those cities. NJ had flagging industries and a large (equally flagging) blue collar population. This created a significant and extended period of the have's and have not's. With the have not's always being on the NJ. Really, all the great improvements and attractions went up in the cities, anything necessary for the city to function, but not great to live near, went in NJ. And this scenario was on the majority of all three land boarders. And the bulk of the taxation benefits of the cities went to PA, NY, MD and D.C. and not NJ (it's arguable that the cities acted as siphons pulling money out of NJ).
The end result has been a long tradition of perceiving that the monied, educated, bourgeois, sophisticated people lived in the cities and the workers, servants, uneducated, farm hicks, paycheck living people lived in NJ. The cities have all the glamor and the lights, NJ has all the grime and exhaust. As is often the case, these attitudes/prejudices fed into themselves until they became cliché and caricatures.