Should I explain a solution to a problem that only existed due to a mistake in the fundamentals in a bachelors thesis? The title is pretty broad, so let me narrow it down a bit:

As part of my bachelors thesis I had a practical part that was about developing a software. Due to a mistake in planning of my architecture, I was stuck with a problem that required a specific algorithm to solve. If I planned that architecture better, or spent the time actually revising the code (would have taken too much time at that point), I wouldn't have that issue. Is this still something I should put in as one of the few "interesting" algorithms I encountered on the paper? Should I admit that the algorithm only existed due to the limitation of my architecture?
If your advisor is an approachable person, ask them! Standards for bachelor theses vary a lot between fields, universities and graders. It may also be that your advisor is the only person who will ever look at the thesis (if at all).

Learning to ask higher-ups is an important skill to learn for your life which is sometimes not tought well in schools.

So, let me summerize my answer: Ask!