Why should I used a blackboard component?

I was making a decorator in c++ I used 2 approaches 1 using a blackboard component and another taking values directly from the pawn. I want to know why should I use a black board component form something like this.

Without BB

bool UBTDecorator_Test::CalculateRawConditionValue(class UBehaviorTreeComponent* OwnerComp, uint8* NodeMemory) const
{
	UBehaviorTreeComponent* MyComp = OwnerComp;
	AMyAIController* OwnerController = Cast<AMyAIController>(MyComp->GetOwner());
	AMyBotCharacter* Pawn = Cast<AMyBotCharacter>(OwnerController->GetPawn());
	GEngine->AddOnScreenDebugMessage(-1, 0.05, FColor::Black, Pawn->bIsSelected ? TEXT("true") : TEXT("false"));
		if (Pawn->bIsSelected)
		{
			GEngine->AddOnScreenDebugMessage(-1, 0.05, FColor::Black, "works2");
			return true;
		}
	return false;
}

Using BB

bool UBTDecorator_Test::CalculateRawConditionValue(class UBehaviorTreeComponent* OwnerComp, uint8* NodeMemory) const
{
UBehaviorTreeComponent* MyComp = OwnerComp;
	AMyAIController* OwnerController = MyComp?Cast<AMyAIController>(MyComp->GetOwner()) : NULL;
	const UBlackboardComponent* MyBlackboard = OwnerComp->GetBlackboardComponent();
	bool bIsSelected = true;
	auto MyID = MyBlackboard->GetKeyID(BotSelectedKey.SelectedKeyName);
	auto TargetKeyType = MyBlackboard->GetKeyType(MyID);
	if (TargetKeyType == UBlackboardKeyType_Bool::StaticClass())
	{
		bIsSelected = MyBlackboard->GetValueAsBool(MyID);
	}
	if (bIsSelected)
	{
		return false;
	}
	return true;

}

Both do exactly the same thing. I want to why should I use the baclboard

The thing is here, you are ASSUMING the AIController type you are acting on, thereby creating a tight-coupling between you decorator and the Actor. The Blackboard allows you to be looser, which enables greater reuse. There will be times where you will want to read data directly from the controller (most often in a Task, however), but most of the time you will want to act more loosely.
You can treat the Blackboard in the same way as you treat a set of parameters for a material.