Yes it is. Including the box when reselling items increases their perceived value. You will often see LNIB in listings which means Like New In Box. It tells you are a more careful owner.
This is particularly important for cameras or bodies in the case DSLRs and SLDs which have lots of small pieces (cables, caps, manuals) and depreciate in value quickly. I agree it takes a lot of space. I have 7 such boxes which are used to store USB and A/V cables, CDs and foreign language manuals which I never use.
As lenses tend to increase in value, the box makes less difference but is nice to have. My primary camera bag usually holds 4 or 5 lenses, so the 20 or so remaining ones are in their boxes. When I switch lenses before a session, I take ones from the camera bag and put them in their boxes and get the ones I need from other boxes. So at any time, I have at most 5 empty boxes taking up more space than strictly necessary. So, using the boxes as storage for their contents while unused reduces space wasted.
For camera bags, I actually disposed of their boxes which I do not regret because those are huge. However, I do wish I kept the protective plastic bag around them. Without it, plenty of my bags are very dusty and textured spongy materials are not easy to clean.