46 While He was still talking to the multitudes, behold, His mother and brothers stood outside, seeking to speak with Him.
47 Then one said to Him, “Look, Your mother and Your brothers are standing outside, seeking to speak with You.”
48 But He answered and said to the one who told Him, “Who is My mother and who are My brothers?”
49 And He stretched out His hand toward His disciples and said, “Here are My mother and My brothers!
50 For whoever does the will of My Father in heaven is My brother and sister and mother.”
brothers (v.46) — almost certainly the sons born to Mary and Joseph after the birth of Christ (Matthew 13:55).
Some commentaries (and I think it makes sense) link the arrival of Mary and the Lord’s brothers with Mark 3:21: But when His own people heard about this, they went out to lay hold of Him, for they said, “He is out of His mind.” His family probably came to stop Him from speaking and stirring up trouble with the authorities.
This is not to say that He lost His affection for His brethren, or failed in love to His mother. In the last and awful hours of His intensest suffering, He still thought of her, and with tender solicitude entrusted her to the care of John. His brethren, moreover, according to the flesh, we find eventually numbered among His disciples. But in this hour, when unable to understand Him, they sought from the motive of a true affection to hinder Him in His work. He resolutely refused to yield to their desire, and by His words revealed the fact that He counted earthly relationships as nothing compared to those spiritual relationships which were born of a common loyalty to the will of God. — Morgan, page 138.
The nation Israel claimed a relationship to Messiah when He should come because of a common relationship to Abraham. But Christ rejected blood ties as constituting a true spiritual relationship. The only ones whom He would accept as being spiritually related to Him were those who were related to Him by faith. In that multitude there were those who claimed a relationship to Abraham as a basis for entrance into the kingdom. Christ said the kingdom must be entered by faith in His person, not by the accident of physical birth. In this paragraph, then, we find the conclusion to the Pharisees’ decision that Jesus Christ was demon-possessed. — Pentecost, page 210.
If Mary and her sons had no claims on Christ due to family ties, the Pharisees certainly had no claims on Him due to racial ties. In that light it makes sense that this passage appears here right at the time that Christ’s offer of the kingdom to Israel was being withdrawn until after His death and resurrection.