Why 天 is chosen for counting days instead of 日 in Mandarin? In Classical Chinese, the proper word for counting days is 日. In Southern Chinese languages, 日 is more prevalent in counting days. Why 天 is chosen for counting days in Mandarin instead of 日? 

Edit

More, in Mandarin it is quite usual to replace 日 with 天 for some words related to day. For example:


星期日 禮拜日 (Sunday) to 星期天 禮拜天
明日 (Tomorrow) to 明天
改日 (another day) to 改天
日日 (Everyday) to 天天
當日 (At that day) to 當天
Interesting question. Is there a preference when it comes to using 天 for 日?

In my opinion, there are no such a strict rules when it comes 天vs日.(I was born and raised in southern China, lived in the North for several years. I speak Cantonese, Mandarin, Hakka)

Basically, 周天and周日, 星期日and星期天,明日and明天, 改日and改天 are all equivalent. But why people prefer one to another?

There're some reasons: 


In some south-western dialects, 日and一 have similar pronunciation. So people prefer use 周天than周日。
Speaking in rhyme. 天tian1, 日ri4. So in some cases, it sounds weird to use天, but in another case, it sounds weird to use 日。That's depends.