Academic code typically just has to work once or a handful of times, for a small number of highly expert users, frequently just for the author. Ease of update is of the essence - you'll rewrite most of it many times, as your understanding the problem change. You can use all sorts of ugly hacks so long as you get what you're after. If any of it ever becomes commercially released or whatever, there'll need to be a comp…
My own experience with reusing code by making a framework in academia: it immediately prompted me to think of interesting cases not possible within it...