RAW: Rangers Companion is poorly written
For a normal ranger hitting level 3 and suddenly having a bonded beast doesn’t make much narrative sense to me, but as written the feature states
you gain a beast companion
There is no how, when or where, you just have one when you wake up.
As such going with this RAW interpretation the simulacrum would just magically have one in the same way the ranger did when they first obtained this feature.
Maybe when you finish casting the spell you hear the sound of trash cans outside being knocked over and when you investigate you find a bear which magically knows about the simulacrum and is coming to protect it.. because magic.
Narratively I don’t think that makes sense
When I ran with a beastmaster ranger in one of my campaigns I made her spend the 8 hours to actually bond with an animal because that seems to be the intent (RAI) of the ability, based on the last part.
If the beast dies, you can obtain a new companion by spending 8 hours magically bonding with a beast that isn’t hostile to you and that meets the requirements.
So I would rule that the simulacrum gains the ability to bond with a beast, but doesn’t automatically gain one.
Either way, once the beast arrives it is as real as it is for the ranger. And your simulacrum is free to spend 8 hours after every single fight bonding with a new companion because the last one died, just like a normal ranger :p