Filing personal bankruptcy deals with all debts which were incurred prior to filing.
The reason the trustee files a pre-bankruptcy income tax return is because it needs to include income tax debt which was incurred right up to the date of filing personal bankruptcy.
The pre income tax return deals with the period from January 1 of the year of filing to the date of bankruptcy. If there is a balance owing on the pre income tax return, it is dischargeable through the bankruptcy process because it is a debt which was incurred prior to filing.
If there is a refund on the pre income tax return, this refund is an asset of the bankrupt estate and is paid directly to the trustee.