It depends upon what your needs/requirements are. It is a bit more difficult for the inexperienced to workout outside of a gym just simply for the fact that there aren't machines telling you what particular actions/lifts will work out which parts of the body. You can find home workout routines online or invest in some P90x type stuff. Sometimes people will use personal trainers at a gym to develop particular workout routines and/or motivate them to achieve whatever goals they have (i.e. weight loss, overall health, strength, etc.). However if you research it enough you can usually find something that fits your needs outside of a gym setting. Like Jack said you can find a playground and achieve your goals... probably not as hardcore as these guys-
, but you get the idea.
I have a gym membership for a couple of reasons:
1) Massive amounts of readily available equipment in a lighted setting 24 hours a day. I'm an insomniac and at times I want to hit the gym at like 2-3 o'clock in the morning. I don't have the space to buy all of the fancy stuff that I like at the gym I go to.
2) Added facility benefits: When I'm done working out I usually want to swim, hot tub, sauna, shower, or use the steam room. My gym has two pools with both swim lanes and general room to relax/soak. Same with sauna, 2 hot tubs, showers, a room filled with bicycles, and a steam room. It has me spoiled when it comes to relaxation incentives. I have a working class job that leaves me aching and exhausted... the last thing I want to do is go from there to lift weights even though it helps me blow off steam. Knowing that I'm going to chill in the hot tub after makes sure that I get there when I can even if I'm hurting.
3) Yoga classes, educational courses, rock climbing, pickup games, and whatnot. I don't always have a chance to take advantage of these features because I work full time at one job, part time at another, and go to school full time. Also I don't like the martial arts stuff and other violent entertainment. However, it's nice to know that there are dozens of classes that I can attend for "free" and more that are available for the cost of supplies. There is also a basketball court, tennis court, and rock climbing wall. There are pickup games every day that I could join if I liked basketball. It saves time too because it is all in one facility rather than having to go to multiple locations.
4) Entertainment. I could watch people in the gym for hours doing weird shit all day. From the guys that grunt and scream like they're taking a dump to the people who sit on equipment backwards and will give you the stink-eye if you dare to correct them. Others that will do like 100 reps for 7 sets to where they are overworking to the point where it isn't doing them any good. All of them are entertaining to watch as they do their thing.