Code golf (because this is how this kind of puzzle is called) also has benefits when learning. You have to find the limits of your language like what happens if you use an uninitialized variable, an undefined constant, the tiny differences between two similar functions or such things. Sure the final code is full of bad practices but it's not as if you'll code the same way everyday (except for physicists, as lots of them still think than naming variables i, ii, iii, and so on is perfectly fine).
Anyway, I find weird you're saying that time optimization would lead to better practices. I mean, fast algorithms are also often cryptic because they're based on how a CPU handles operations. Just take this famous example from Quake III Arena (with original comments):
float Q_rsqrt( float number )
float x2, y;
const float threehalfs = 1.5F;
x2 = number * 0.5F;
y = number;
i = * ( long * ) &y; // evil floating point bit level hacking
i = 0x5f3759df - ( i >> 1 ); // what the fuck?
y = * ( float * ) &i;
y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration
// y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed
This function is an optimized approximation of inversed square root, or to say it differently
x^-0.5. Will you learn good practices from it? Certainly not.