The second sentence is fine. I don't personally see any need for "as to why", but you do hear it. To me it seems informal/conversational and not very suitable for written English.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.