не было + genetive. It's a set thing.
Не было стола
Не было денег
etc and etc
How do I explain it? Easily, one of the meanings of the genetive case is conveying absence or lack of someone of something. Here it perfectly corresponds to the absence meaning.
Just a quick heads up though. Don't confuse these two structures:
тебя не было дома vs ты не был дома.
They basically convey the same meaning but their grammatical structures are different