The big problem with that question is "cake". Mappings change our entire perception of a scenario (The mass-grave-filling problem of Tetris being a classic example). Cakes have tops, bottoms, fillings, decoration, and so on. This makes a perfectly reasonable question into something much more nasty
This is the same issue I have with the egg drop problem. It can be logically deduced and so it's sort of a fair question for a software engineer. But, given the abundance of more relevant algorithm questions, there's just no reason to ask it.
Ultimately what it comes down to is this: brainteasers are banned and have always been (or at least for a very, very long time). However, since everyone defines brainteasers a little differently, you could still get a question that you feel is a brainteaser.
And it was a reasonable question that may or may not have knocked me out of the job, as long as by reasonable you think it's "fair" to serve some people the bottom half of a cake and other people the top half of a cake.
But I of course don't know if that's what knocked me out.