Ummm... no.
The text is pretty clear that it will defend you if you are "incapacitated or absent" and will take reactions. If you are capacitated and present, it only attacks if you command it.
That's fine if the DM house rules that. But that reading is still very much an
addition to the rules.
The text says:
The beast obeys your commands as best as it can. It takes its turn on your initiative. On your turn, you can verbally command the beast where to move (no action required by you). You can use your action to verbally command it to take the Attack, Dash, Disengage, or Help action. If you don’t issue a command, the beast takes the Dodge action. Once you have the Extra Attack feature, you can make one weapon attack yourself when you command the beast to take the Attack action.
If you are incapacitated or absent, the beast acts on its own, focusing on protecting you and itself. The beast never requires your command to use its reaction, such as when making an opportunity attack.
That's pretty clear.
IF you command it, it attacks.
IF you do not, it Dodges. It never attacks without your command unless it is making an opportunity attack
or you are unable to take actions. It doesn't counterattack. It doesn't keep attacking. It doesn't Help or assist. It Dodges. Period.
So either you make an attack or the beast does. While the beast adds your proficiency bonus to its damage, this will seldom boost it's damage beyond what a ranger could do themselves let alone with the damage bonus from another subclass feature.
The beast does not noticeably increase the damage of the ranger.
As for hit point mitigation... at 6th level it will have 24 hit points. The average damage of a CR 6 cyclops with a thrown rock is 28, and it's club is 19 (but it has two club attacks). Pet is going down. A chimera can also drop it on one turn with its three attacks (two if it rolls well). As can a chasme, vrock, young white dragon, drider, etc. Pretty much every CR 6 can roll over the beast companion in a round. After which, it likely spends its 2-3 d8 Hit Dice to regain maybe 8 to 13 hit points, and is now a single attack away from going down. After which it's gone for the rest of the adventuring day and the ranger now lacks a subclass.
And this is when the beast is at its most effective. Because based on the chart on page 274 of the DMG, monster damage should increase by 5 each CR, while the beast's hp only increases by 4. So at 10th level, it's 5 hit points behind the curve. And at 15th level the expected damage of a monster is now 10 damage beyond the maximum hp of the companion. It's now going down in a single attack from multiattack and the monster is going to just keep going onto the rest of the party.
This is without considering AoEs where it goes down
and doesn't take a hit for another party member.