There are many ways of imagination. That's why this question was asked by an interviwer in a Technical interview, to check the creativity of the interviewee.
The only way to cut the cake is first try to imagine the cake in 3D and not in 2D. Hope that you get an answer to the question.
The three cuts can be made as two cuts on top, dividing it in 4 equal parts and then cut the cylinderical cake in 2 equal parts by height. And the 8 equal parts are there.