Why does =TEXT(0,"###") return nothing?

The 0 could be a cell ref that contains 0, or another formula that returns 0.

Is this intended behavior? A bug?

Try =TEXT(0,"#,##0"). I think the “###” format is useful for accounting applications, and maybe where you want to put the emphasis on the numbers that do have a value. Cheers, Al

Avoid the point as group separator in numbers. It’s explicitly deprecated by ISO standards (ISO 31-0) for good reasons.
Also consider Why do I often get an error (508, 504, 502 e.g.) if I paste a Calc formula from some post into my sheet?.

Sorry. Point taken; separator for functions too. Cheers, Al

This is the intended behaviour. # is used to display a number, unless this digit and all potentially visible digits to the right of it are zero. That way you can avoid displaying trailing zeroes - and for your 0, all digits are the trailing zeroes.

See Number format codes in help.