In this example, we know one thing for certain: this experiment will fail to produce edible cupcakes. However, what we are more interested in how exactly it will fail.
The same things happen when we put explosive characters in the same room together. We know it won't end up good, but we want to see how bad it gets.
This is maybe the best reason to pursue an idea that you know sucks. Do it, knowing that it will fail, just to see how exactly it does fail. There is much knowledge to be had there.