In Poland I can use my bank login (a “Trusted Profile”) to sign in to government websites and access my data.
E.g. when I registered for Covid vaccine I logged in using my bank login.
There are other ways to do it too but since I already had an account in a participating bank I didn’t bother looking into them.
I don’t know if banks earn anything from it. I’d be surprised if they did.