No, it is not a bug. You have shown that
echo '*'
will produce a literal *. Hence when you substitute this output, as per the following command
TEST=$(echo '*')
it will put * into the variable $TEST. Then when you
echo $TEST
the glob will expand here. You can verify this by running this last command, changing directories, then running it again.
You will get the * output if you say
echo "$TEST"
as explained here, the double quotes allow the variable to be expanded but prevent the glob from expanding.