Indeed, this is what often happens in TOAW games...
Historically speaking, e.g. in WW2, there were numerous cases where units were combined or recombined in various ways, their roles being changed temporarily or permanently. For example, in WW2, Germans were known for creating ad-hoc "Kampfgruppen," often consisting of elements of various smaller units combined and fighting together as one unit--Germans often threw in anything that they had at hand, including recon units...
As far as TOAW is concerned, TOAW does not allow changing OOB, so the type of units and the make-up of formations is frozen. So, the player is not flexible as far as his/her units are concerned. This is probably why we sometimes (or maybe often) get situations like the one above. The player simply uses what they have at their hands, not being able to change it, reassign it, or whatever. And so we get these "unrealistic" situations...
However, considering situations like the one you mentioned above, I wouldn't look at the type of unit so much as at its make-up. The point is the term "Recon" is just a label, nothing more. It is a kind of generalisation, pointing the general or typical use of the unit, but surely, it does not mean that in case of emergency the unit couldn't be used in a bit different way. In my view, what matters in situations like that is the kind of equipment that the unit consists of. For example, if the unit was a motorcycle recon unit, then to me it would be rather unrealistic for it to invade in a port--I don't think anybody would ever send motorcyclists to do beach landings... Otherwise, why not... Of course, units usually consist of mixed equipment, so it's generally hard to say whether the move/attack was realistic or unrealistic. Besides, what does "unrealistic" mean? As history can teach us, there were many "unrealistic attacks" that actually succeeded and numerous "realistic" ones that actually failed... And as for checking the unit equipment, players normally don't have access to the list of equipment that the enemy unit consists of. So, in order to check it, we would have to load the scenario in the two-player mode and then check the detailed make-up of the enemy unit. This is obviously not a practical solution.
So the best way in situations like these, I guess, is to clench your teeth, zap the recon unit, launch a full-scale offensive, and beat the enemy bastard!