The Channel Box appears in the sidebar when you select Display > UI Elements > Channel Box/Layer Editor, or click the Channel Box/Layer Editor icon in the Status Line (toolbar).
You can display either the Channel Box or the Attribute Editor in the sidebar, but not both.
If the Show Layer Editor within Channel Box option is off in the Maya Preferences, then the Channel Box and Layer Editor buttons appear separate.