It wasn't cancelled. Lilo & Stitch: The Series ran three successful seasons (2003–2006), concluding naturally.
Likely reasons for ending:
Show enjoyed reruns/streaming popularity, spawning sequels: Stitch! The Movie (2003), Lilo & Stitch 2 (2005), Leroy & Stitch (2006).