If I turn off (deattach) a file with a design system... why can I still go to its main components?

I still can’t comprehend how the additional linked files (libraries) work.
Not to mention the problem with swapping… but WHY is it that if I deattach (blue switch in libraries turning to grey) a file that has a design system with components in it, I can still click in the design file onto a component instance and go to main component and it will open this file?
This doesn’t make sense!

This is not detachment. This is simply you turning off this library from the Assets, Swap Instance and Insert Component menus. It’s only a cosmetic change. It doesn’t change anything about the file.

The toggle says “enable”, not “detach”:

Oh, come on- “enable” / “disable” are pretty straight forward. It should IMMEDIATELY detach the linking from component instances to the main components in the design system file.
So what is it for at all? For fun?
If you can still come back to ANY file that has been used as a design system file (with main components)? What’s the use of it?
This is totally illogical.
What is more - combined with faulty working “swapping” - it creates a really bad situation of broken design with multiple files linked. This makes work HARD.

I can’t fix Figma, but your question makes me very curious: why do you want to “detach” the whole library in the first place? This isn’t a “normal” thing to do, you may even be the first person in history to ever ask this. There may be workarounds for what you are trying to achieve or maybe you just need a bit of a better understanding of libraries and design systems, how they are used, and what best practices you can follow in your workflow.

Because I want to able to. E.g. I want to copy the old design system and work on it because I took over the project. So I figured out swapping is the thing (when I find out why it breaks the whole design even though I swap 1:1)… so I swap the contents of the design system file onto a new one and I want to reattach them - detach the old one, attach the new one.
No no no… if I have to understand that, then it’s a piece of shit. It has to be logical… and it seems logical, yet it gives out other outcome than expected.
And this detaching feature? A complete idiocy. As I said - I think of it as attaching CSS styles (linking)… let’s say detaching doesn’t destroy the visuals (like it would with CSS) but how would I still be able to come back to the main component of the DETACHED file!!! This is outrageous and ridiculous. Detached is detached!
EDIT:
Swapped the file and yet the old file is “used by this file”… but WHY?

I believe everyone needs to learn to do their job. You learned how to use design tools in the first place somehow, so why not keep learning? Also sounds like by “it has to be logical” you mean “it has to read my mind and do what I want” which is not how any software works, unfortunately.

Ok, so I understand, you want to keep the old copy of the library and create a duplicate of it to keep working on it. Pretty common use-case, and you seem to be doing it correctly with the Swap Library feature. Unfortunately it’s indeed buggy sometimes. If you are facing the issue of some components or styles not being swapped properly, I would suggest you to record a video, share a file link and send that to Figma support team via the bug report form.

You know why a situation where they introduce a new logic to what’s already there is bad? Because we’ve been through a lot of tools that copied ideas because they meant efficient work - logical and efficient. It’s like you use your mental models (come on, this is a UX/UI tool!) for new tools - you see something, you think of a mechanics, you immediately try to think of something you already know, hence my thinking of CSS styles. Any situation where a company wants to change the flow/logic/whatever of even a piece from their software will be a disaster. Think of e.g. drawing a rectangle. Now, suddenly, some “genius” at Figma thinks that the only way to draw a rectangle is from the inside out (you know the way) - and there is no switch, no shortcut, nothing. Wouldn’t you be furious?
I will be trying to take a piece of design into a separate file and swapping the library to see the result. But the attachment feature - yeah, maybe we need a real attachment feature not just those enable disable sliders? Although I think after swapping it does change linking to main components so it should theoretically be OK. Somehow, it broke my designs…