It's well known it was never an actual treasury; there's not much inside to it, and it's the first main "building" you see when entering through the canyon, designed to impress rather than store valuables.  The name comes from rumour/legend: 
https://en.wikipedia.org/wiki/Al-Khazneh#Name.  Most of the cliff structures are tombs.