It does help prevent actual malware from being downloaded, though, since upstream developers probably won’t publish malware on Flathub.
But this is still a half-measure. I don’t understand why Red Hat and Canonical don’t treat this issue seriously; people on Linux are used to assuming software installed from the repos are safe, and yet Snap and Flatpak are being pushed more and more despite their main repositories being potentially unsafe.