Chosen Solution

Why my phone transfer files to computer by Usb cable

Do you mean HOW does my phone transfer files? Most phones require enabling the setting under Developer options. Then when phone is connected you get a popup asking what you want to do. My Samsung does not give me that popup, but the phone must be open for it to work.