When a message is end-to-end encrypted, it is scrambled on the sender's device and only unscrambled on the recipient's. The service carrying it, and anyone intercepting it along the way, sees only unreadable data and cannot recover the contents.
The strength of the idea is also its limit: because the provider cannot read the messages, it cannot recover them if keys are lost, and it cannot scan content on its servers. Security and convenience pull in opposite directions here, and the design chooses privacy.