You don't have to use the longer cord, but as a 3-prong plug it is a fully grounded extension. I use it because the wall outlet is often farther than the thin cord.
If you slide off the "duck head" module (the 2-prong plug that swings) from the power brick, you will see that reveals a place for you to attach the longer cord.
Apple ships it in two pieces for international compatibility. If you had bought this in another country, you would have gotten a different AC cord with a different country-specific plug on the end, along with a corresponding duck head for that country.
If you buy the international power adapter kit, you can replace the 2-prong duck head plug module with a module that fits the AC plugs in the country you are in.
If you have used Windows PCs in the past, this is not that different from their power supplies, since many of those also come with one cord from computer to power brick and a second cord from power brick to wall. Apple's just looks a little different, but is also usable without the second cord.