This is a Feature of InDesign and not a bug.
If you want to stop this from happening, go to the Layers panel flyout menu and uncheck the option called “Ungroup Remembers Layers”. When this option is unchecked, the ungrouped items remain on the same layer as they were (when grouped) and will not return to their original layer.
Hope this helps.
Adobe InDesign team
An error occurred while saving the commentChristophe Zeller commented
Thanks ! It works :)