"Same as I do" or "same as I have"
Solution 1:
I'll try my best to answer the "why" part of the question. I prefer giving visual examples rather than writing paragraphs of grammar, hopefully, this ought to explain : "I can't spot a reason why the second is ungrammatical, but it grates on my ear."
In British English it is common to inverse the position of the auxiliary verb, have, with the subject to form a question.
"Has she (got) the same book as mine? or
"Has she (got) the same book as me?"(informal)
You can therefore construct positive sentences in this manner:
She has got the same book as I have (BrEng)
She has the same book as I (very formal) or
She's got the same book as me (informal)
In American English it is more common to use the auxiliary verb, do, to make the question form.
"Does she have the same book as mine? or
"Does she have the same book as me?"
This is, I believe, where your logic has led you to surmise the positive sentence should be said or written as;
She has the same book as I do.
Whereas it is more correct to say,
She has the same book as I (have).
Solution 2:
I can't spot a reason why the second is ungrammatical, but it grates on my ear.
I would only ever say or write the former "She has the same book as I have.", probably to retain the possessive inference of to have.