This expression is an idiom. As such it has a meaning that extends beyond the literal, word-for-word translation.
Literal meaning: a•la is a verb that has many meanings. In this context, it means ‘came up with,’ ‘resulted in.’ To•hu is a Biblical word that describes the state of the earth before creation: a void. Together with another word, va•vo•hu, it means ‘without form and void.’ ‘To•hu va•vo•hu’ is the complete expression used in Genesis 1. (See related previous Hebrew Word of the Day under this name).
Extended meaning: the meaning of the idiom is ‘being wasted,’ ‘a complete failure of an attempt to do or to attain something.’
Biblical usage of to•hu:
“He stretches out the north over the void, and hangs the earth upon nothing”
Biblical usage of a•la ba•to•hu:
“The caravans are turned aside from their course; they go to the waste, and perish”
This expression is also very common in modern and literary Hebrew. It mostly has the second meaning of ‘complete failure to achieve something’ (despite serious efforts).