Obviously she knows she is a liability to the empress if she is smart... since she is not clever/skilled enough to hide her intelligence. She has to convince the empress to keep her until the war begins, where she can use her book knowledge in full force (accurate knowledge of enemy leader personality as book characters, foreknowledge of enemy strength, a few guesses of enemy attacks or ambushes). Since Canaria knows the ML is victorious she has to get close before the war. She is forced to betray both sides until the war, where she can really prove loyalty to the ML and be strategically useful.