Class() returns dual value that has numeric value and text representation.
Num() converts text representation, so this type expressions: Num(Class()) works well without any additional 'work'.
Right, class() returns a dual, but the numeric value will only hold the (AFAIR) lower limit of the interval that class() is creating. So, applying num() will only format that lower limit and replace the text value (which holds the full interval as text) with the formatted numeric value (like Juan observed also).
If you want to keep both limits of the interval in the text representation, I believe you need to use some kind of text manipulation, something along the lines Celambarasan suggested.
Would be nice if QV would just apply the standard number format by default.
You're right, if you need to change the string format that class() will return, it's probably better not to use class() at all.
And if the classification is only based on field value (no aggregation, not depending on selection state), like in the discussed chart, I think it's even better to calculate the classification in the script.
You can then use one of the classification methods discussed here: