Why use a tent filter in path tracing? The 99 lines of C path tracer Smallpt renders a 2x2 subpixel grid for each pixel it intends to render and then does a tent filter to combine them.

There is an interesting presentation explaining the code here, and it mentions the tent filter but doesn't explain why it's there.

Can anyone explain why a tent filter would be preferable in this case over a box blur (just averaging the samples)?

Would it be higher quality to go with something better than a tent filter, such as bicubic hermite interpolation?
The theoretical ideal antialiasing filter for discretely sampled data is a sinc filter, because it perfectly removes all frequencies higher than the Nyquist frequency, while leaving alone all the lower ones. So, to some extent, we can expect antialiasing filters that more closely resemble the sinc filter to produce better-quality images.

The tent filter (triangle filter) certainly resembles the central peak of the sinc filter more closely than does the box filter:



A bicubic filter (e.g. Mitchell-Netravali) could capture the shape of the sinc even more precisely, including its first two negative lobes.

The reality of filter selection is a bit more subtle than "approximate sinc as well as possible", since there are different kinds of artifacts that can be generated by "non-ideal" antialiasing filters, such as aliasing, overblurring, and ringing. Also, different filters may be more or less computationally expensive. So it's a game of trying to trade off the different artifacts against each other and against performance. Different scenes/images may favor one choice or another, and it's also partly an aesthetic judgement.

As for why smallpt uses a tent filter in particular, I would guess for a combination of performance (it's a quick filter to evaluate) and brevity—it can be done in a couple lines of code, while a bicubic filter would take a bunch more code.

Incidentally, smallpt actually uses a 2x2 subpixel grid and places a tent filter at each subpixel, then averages together the results of the four subpixels. So the overall effect is, curiously, that of the sum of four tents, which ends up looking like a pyramid with a flat top:



I'm not sure if this was intentional, or just happened to be the way it worked out. My guess is this results in a somewhat sharper image than if a single tent filter per pixel were used (because of the narrower support), but probably also more visible aliasing.