You buy a camera ..you are actually buying into the camera makers system ..most importantly you are buying into the lens system.
People always assume the results from my camera is from a Canon or Nikon and the results are what matters, not the brand names, and results can be had for far less expense.
... of course people often think some of my images were made in Photoshop and not all done in the camera so what do people know anyway? :)
The camera used to be "just a box" but not anymore as the CCD, camera CPU and the internal software is now often just as important as the lenses and sometimes more important as the best glass known to mankind cannot correct for artifacts caused by the camera software.
Also, Canon and Nikon aren't the only lens makers out there. Several brands make some really good glass and you can often save literally thousands (or tens of thousands) by picking a camera body with technology built into the body, like anti-shake in my Sony (Minolta tech) vs. putting that expense into every stinking lens.
My 100m macro is sharp as a tack, fast, and anti-shake, and it didn't cost me a small fortune either.
But as Leosghost correctly pointed out, the major expense you're buying into is a lens system so make sure you find everything you want before picking a system because I've been using the same lenses for about 20 years now and we're on the fourth camera body now with both digital and film cameras, but I never lost the investment in the lenses. Then again, I used to be a bit of a hardcore shooter and always carried two bodies as the shutter on one or the other died every now and then out in the field and the cost of the second camera body is much less than the cost of the trip.