What are the effects of having the TLS certificate and private key in same file?

Does the software know to only send the certificate parts and never send the private key, even though they are in the same file?

Yes.