There is a great book in German called " Fett Logik überwinden" ( Overcome fat logic) that scientifically clears up a lot of the myths around gaining and losing weight. What you write about are the classics mentioned in this book.
You need the protein and minerals as building blocks for the muscles. That is why you need to take special care to ingest enough of them with that low calories.
More muscles burn more energy even when idle, that helps losing weight. Looks like you did that right.
I see, looks like the book is available in English.
Conquering Fat Logic
How to Overcome What We Tell Ourselves about Diets, Weight, and Metabolism
Nadja Hermann