Hi @wawa-2377 ,
You mentioned that you had a P2 trial in your tenant. So at some point in time you had a P2 license, and may have started using PIM during that time. The PIM feature's primary technical license check is at the time the admin starts using PIM. The documentation mentions that after the license ends the service will be removed, but there is a grace period prior to the automatic removal of the service. Azure AD Premium services don't "stop" at the exact time a trial expires, since users may need to export their configuration from the service.
Hope this helps!