Is mining used for some useful computation?

Is mining used for some useful computation?

The computations done when mining are internal to Bitcoin and not related to any other distributed computing projects. They serve the purpose of securing the Bitcoin network, which is useful.