Repairs and problems
Cracked shower trays and what caused it
Trays crack when they are unsupported. The crack is the symptom; the void or the failed bedding underneath is the cause.
Your questions answered
Can a cracked tray be repaired?
Cosmetic chips yes; a through-crack under load will reopen.
Why did it crack years later?
Bedding shrinks or a void develops, and repeated loading eventually exceeds the tray's unsupported strength.
Likely causes
Point 1
Acrylic and stone resin trays both need full support across the base, not just at the corners.
Point 2
Repair kits exist for surface damage, but a crack passing water through a tray usually means replacement and rebedding.

Getting cracked shower trays right first time
Describe what is there now and what is bothering you. It is usually clear within a message or two whether this is straightforward or needs a look.