I am the support developer for a project on Magento 1.3.1. There is a problem I can't reproduce. Some customers wrote that they receive emails of orders of other persons. In admin I saw that person X made an order (practically at the time as another) and it got assigned to another person. How is this possible. I spent a day without success :(
I'm assuming you can see this customer order overlap in the admin panel as well. From my experience, this can occur when the increment field known as entity_id from the customer_entity table and the customer_id field from sales_flat_order are out of sync.
I came across this when I had to merge two completely separate stores into one and I didn't adjust either's set of customer_ids from sales_flat_order.
If you are experiencing the issue for NEW customer accounts then you need to bump the AUTO INCREMENT value in the customer_entity table. Go to sales_flat_order.customer_id and sort descending - see what the last value is. Let's say the last value you find is 5000, you would execute the following.
ALTER TABLE customer_entity AUTO_INCREMENT = 5001;
Going forward, all customer IDs would start from 5001.
If you examine sales_flat_order.customer_id and customer_entity.entity_id and find they aren't out of sync and that this only affects prior orders then you have a bit of data parsing to do. Specifically, you'll need to hopefully find out how this happened (potentially a bad merge of two sets of order/customer data) and plan on shifting whatever customer_ids are overlapping between the customer_entity table and the sales_flat_order table.
If this doesn't help then I have to ask what type of setup you are running: Single application server containing both the web server and database OR distributed servers containing different parts of the web stack (e.g. database contained on another server, 3 load balanced application servers, sessions stored as files instead of in the database, etc).