Hello, if anyone has this problem of Blender's AutoWeight not behaving correctly to the mesh then I have some solutions for you to try.
The Problem
Your Mesh and Rig ready to bind
You choose AutoWeight
Your Mesh becomes like this.
IK on mesh looks weird.
Solution: Recalculate Inside
In Edit Mode >> Select your Mesh >> Mesh Button >> Normals >> Recalculate Inside
Now Better.
If you find your mesh rotate weirdly after AutoWeight. For example, This elbow mesh rotate upward after binding
You can try correcting your bone rotations (roll) before redo the Binding.
I got stuck with this for days. I couldn't understand why the imported models bind correctly while my own Blender-built model didn't. I couldn't find much help from google either so I hope this would help someone too.