Phra Malai is just the Theravadin adaptation of the Mahayana Bodhisattva Ksitigarbha, who in Mahayana Buddhism is associated with liberating beings from hell.
A lot of Mahayana Bodhisattvas have been incorporated like that into the Theravada tradition like Samantabhadra and Avalokiteshvara, so it's not surprising that Ksitigarbha is as well.
The non-doing of any evil,
The performance of what's skillful,
The cleansing of one's own mind:
This is the Buddhas' teaching.