Just where does it say that:
A) Pike won't be reassigned to the Enteprise once it is repaired and his current mission/assignment is over?
B) That a ship captain is reassigned to other duties while his vessel is out of comission?
Kirk was not assigned to the Enterprise when it was under repairs (Heck, he STOLE it to get it back).
Also, nothing in this storyline in Discovery is invalidating that Pike captained the Enterprise when Kirk took over. It's years in the future from where Discovery is right now.
It was made pretty clear that commanding the Enterprise was "a big deal", and the reassignment was so that Pike could continue his current missions to investigate the red light thingiebobs. Which is why he was reassigned to the captaincy of the Discovery over the Saru - the mission was important enough to bypass Saru's rank.
Pike certainly could be reassigned to the Enterprise once it's functional again. But the key point here is that there's a loophole in canon that's been exploited here. Up until this point, it looked like Pike commanded the Enterprise right up until his promotion to Fleet Captain (a now apparently obsolete rank, like Commodore) and command was turned over to Kirk.
I was pretty stunned at the revelation that the Enterprise didn't participate in the war against the Klingons and was considered "a weapon of last resort". If the Federation was as badly on the ropes as implied, EVERY SINGLE CONSTITUTION-CLASS VESSEL SHOULD HAVE BEEN RECALLED. Compared to Discovery, what is so special about it that Starfleet considered it too valuable to lose?
(well, besides that fact that all further canon depends on its continued existence...)
cheers,
Gabe