Python Script to import obj and create collections
I guess what happens here is that the command bpy.ops.import_scene.obj imports the obj files into blender as children of the Scene Collection (i.e. bpy.context.scene.collection). This just seems to be the behavior of that import command and there seems to be no parameter of that import command allowing you to change the behavior.

Now, your code creates new collections and links the imported obj's to those new collections. Linking means that these obj's are referenced by those new collections as well as the Scene Collection.

The point here is that objects can be referenced by as many collections as you want. This effectively allows you to build a graph, not just a tree. That behavior resembles the behavior of layers in Blender version &lt; 2.8.

What you need to do is unlink those obj's from the Scene Collection which you can do by adding an unlink command in your for loop:

for ob in bpy.context.selected_objects:
    myCol.objects.link(ob)
    bpy.context.scene.collection.objects.unlink(obj)