This is because frozen veggies are picked at their peak. They are then immediately blanched and frozen. Thus most of their vitamins and minerals are well preserved.
In contrast, fresh veggies may have already been sitting on the supermarket shelf for a while before going onto your plate. They also may not have been picked when ripe.
In any case: fresh or frozen, eat veggies to your heart’s content. They are filled with vitamins, minerals and nutrients. Any veggie that makes it onto your plate is a good veggie!