por is a very versatile preposition. Depending on the context, it can mean by, through, at, in, on, for, because of... etc. In these constructions, the preposition acts similarly to the at or in in:
Tomorrow [in the] morning
or
Yesterday at dawn
For the equivalents of afternoon and morning a preposition isn't needed in some Romance languages (or English as you note):
Fr
Demain matin.
It
Domani mattina.
Ro
Mâine dimineață.
but in many other Romance languages one is used:
Pt
Amanhã de manhã.
Gl
Mañá pola mañá.
Sp
Mañana por la mañana.
Ca
Demà al matí.
Co
Dumane à dumani.
Given the split of languages here, and additionally knowing the Spanish phrase has had currency since the earliest Old Spanish documents1 and that the Latin phrase crās māne lacked such a preposition, it seems this development occurred early in Iberian vulgar romance.
This may have evolved by analogy to how in Latin "tomorrow evening" was distinguished as a noun crastinus vesperi vs as an adverb cras ad vesperum, or by analogy to how per was used in other Latin time constructions2 (e.g. per diem, per noctem, per Dionysia etc).
Sources:
...oy es día bueno e mejor será cras; por la mañana prieta todos armados seades...
...cras a la mañana pensemos de cavalgar...
Poema de Mio Cid, 1140 - ("por la mañana", CORDE)
- Nominal Apposition in Indo-European: Its Forms and Functions, and its Evolution in Latin-Romance, Brigitte L. M. Bauer (p.242-244)