You can claim that you intend for it to crash, and get passed, and then it would be working because it does as you intend.
If you say that something is working, then you are making that claim.
If you intend something else, then working is probably not the right description of what's going on and you might instead be looking to compare what your code does to what you intend so to figure out what to change to bring intention and reality together.
And if you're asking why something is working, then you should instead read up about that something until you possess most of the knowledge to understand why that something is working. This information is easily available and you do not need to ask about it. If you're missing some specific part and it is difficult to find, then that would be something that is suitable to ask for.
And when you're stating that something is working, you are also saying that you're understanding what it does, because otherwise you are not able to determine that it is working. Saying that something is working and then asking about how, is a very poor way to phrase a question, there is no sensible answer to that. You're asking for information that you are saying you already possess.
Please, read some articles about asking technical questions. There is some very valuable insight in those and can help you ask questions that have answers and in particular invite answering.