I am not a jew, so not positive, but apparently the reason it follows the mother’s line is that there isn’t a doubt of who the mother is. Can’t say the same for the father.
And it’s not that they are religiously Jewish, but a child of a jewish mother has an automatic place in the “Jewish Household.” But if they reject Judaism for another religion or atheism, then they become Apostate to the Jewish faith.
Or something like that.
I find it ironic that if such rules really exist since you are not positive nor are you a Jew, it resembles what Hitler did with tracing the ancestry of Germans to determine if they were pure Aryans. I was stationed in Berlin while it was still an occupied city and there was a place called the Berlin Document Center that contained, among other things, many records tracing the ancestry of Nazi officials and the SS, which they had to provide to show they were pure Germans.
Is Judaism a race or a religion?