The only thing I can tell you is my messages are all stored on the phone (except the ones I deleted, obviously). I use Handcent but the messages I sent (and received) with that are still available in the Messaging app so it must store them in a "known" central system.
I've no idea how you tell it not to. The only settings in the default App I can see is Settings->Delete Old Messages, have you got Text Message Limit set low? (Mines 200). Sorry I can't help more, anyone else know some vague setting ?