Sometimes you can get a well-defined problem, but finding the "right" analytical solution will take you days of reading up on it, and the chance of getting it wrong is relatively high. Especially if you don't have someone with strong mathematical/statistical background to review your work.
In those cases, finding a programmatic hack around it is a very good approach for giving you reasonable results in a shorter timeframe.