Sometimes PWA will delete the wrong account. If you place an order using PWA, it adds a session variable named customer_is_guest, but it never clears the session variable. If you place a second order using an account, then it will delete that account when it processes the order because the customer_is_guest session variable is still set.

Edit catalog/checkout_process.php

Find:
// PWA BOF 2b
if (tep_session_is_registered('customer_is_guest')){
//delete the temporary account
tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
}
// PWA EOF 2b

Replace with:
// PWA BOF 2b
if (tep_session_is_registered('customer_is_guest')){
//delete the temporary account
tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "' and guest_account = true");
tep_session_unregister('customer_is_guest');
}
// PWA EOF 2b

Edit catalog/logoff.php

Find:
// PWA BOF 2b
if (tep_session_is_registered('customer_is_guest')){
//delete the temporary account
tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
}
// PWA EOF 2b

Replace with:
// PWA BOF 2b
if (tep_session_is_registered('customer_is_guest')){
//delete the temporary account
tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "' and guest_account = true");
}
// PWA EOF 2b



More...