When creating an assignment in the Assignments tool, if you choose the option "Add Assignment to Gradebook" but do not choose a category, the assignment is listed as being included in the course grade calculation, in the Gradebook.
However if you go and edit the assignment in the Gradebook, the checkbox is disabled and unchecked. This is because it has no category and in order to be included in the course grade, it must have a category. Setting a category makes the checkbox available to be controlled and leaving it turned off and saving, forces the setting back to 'No' on the main screen.
I believe the issue is that there is no way for an external assignment to indicate that it should be included in the course grade or not and the gradebook service or the UI is picking a default value.