XC bikes are meant for racers. Racers who race on nicely groomed trails with no major obstacles like rocks, roots, jumps, and logs. They are designed to be light, light, light. They sacrifice durability for this lightness. Now, don't get me wrong, they are perfect for their intended application and it's not like someone can't do some all mountain (back country) riding and have the bike come through okay. But why would it come through alright? Because that rider knows how to pick very smooth lines, knows when not to push the limits of the design and walk, etc. What they don't hold up to though are the mistakes - that bad landing, that rock hit at the wrong angle, etc. Yea, it'll hold up for a little while but not for long.
All Mountain is another term for a do-it-all bike. It's not the lightest but it is durable and usually has a nice durable parts selection. There will be frame gusset reinforcements. The wheels will be heavier and stronger. You can hit small jumps and gaps. You can land off kilter and not have to worry (except for yourself if you fall LOL). It is just a good all around bike that will last through mistakes and provide, and this is key I think, YEARS of enjoyment having made all those mistakes. It is important I think to note that a good solid and reliable bike like this is generally not going to cost a bunch either. They can but that is usually because the parts build is high end line product. XTR. SRAM X.0 builds or the like. This gets the all mountain bike as light as possible although it still won't be a dedicated XC bike with regards to weight.