The point in general is as TV says. Where it falls down here is, the crafted items can often be purchased for less Dilithium than they can be crafted for. But that's a detail, and is why there's a test server.
The general concept of Dilithium being both a crafting material and a currency is a sound one based on real-world economic principles. Your wedding ring is made of a material commonly used as a medium of exchange, after all. The idea of money NOT being made of crafting materials is pretty new to civilization in general.