I am not sure how quotes work in Magento. I saw that a quote id is assigned to customer when is created. Sometimes I see in sales_flat_quote table that for one customer there are 2 lines there...I mean there are 2 quotes.(actually one has store_id=0 and one store_id=1) When a users log in through API (custom code) it seems that a new quote is assigned to. I don't get what is happening..or how should this work..
A quote is actually a 'cart' object.
A customer can have many quotes. One for each website.
the quote object is not created when the customer is created. It is created when the customer adds the first product to the cart.
Also a quote is not necessarily assigned to a customer. You can have a quote when browsing the website as guest.
In that case the quote remains in the db after the session expires.