When Jesus says that Tyre and Sidon would have repented in sackcloth and ashes, he invokes a familiar biblical picture of repentance made visible. Sackcloth was rough clothing, while ashes could be placed on the body or associated with mourning and abasement.
The image communicates grief and repentance in a form that others could see.