Hello @batuhantrkgl and welcome to the community.
No, actually it is not a bug.
GNOME Software doesn’t ask for a password as well.
This is because PackageKit-command-not-found
(the component responsible to suggest package installations for commands not found), well, uses PackageKit [1] like GNOME Software under the hood.
And Packagekit in tandem with PolicyKit uses a different approach to user rights than classic sudo and so on (sorry, I’m not exactly an expert). Your user is an administrator so it is likely allowed to install stuff.
For the records, if you try the same stuff from an SSH (that is, form a non local) session, the PackageKit-command-not-found installation proposal will fail.
For reference: How does automatic installation of CLI software without authentication work