Pondicherry is an appropriate locale for Pi's upbringing and childhood because it offered a lot of diversity. The book takes place right around 1970s India, and it is a rough place. Not with gangs and that kind of stuff, but government upheaval is happening. Indira Gandhi is flexing her political muscles and establishing more and more stringent rules over Pondicherry and other parts of India. It feels stifling to Pi and his family, because Pondicherry itself is very diverse. Because it was once part of French India, there is a lot of cultural and religious diversity there. It only makes sense that Pi would gravitate toward that diversity. For example, take Pi's religion. He's Christian. And Muslim. And Hindu. At the same time. Pi doesn't see a problem intermixing his three faiths because he sees them intermixing among the population that he lives with.
Pondicherry's diversity mixed with the tightening government oppression serves to show the reader how and why Pi himself is both tolerant and resilient at the same time. Those two skill sets are absolutely critical for his survival on the life boat with Richard Parker.