“For,” said Peter, “it is written in the Book of Psalms: “ ‘May his place be deserted; let there be no one to dwell in it,’ and, “ ‘May another take his place of leadership.’
Acts 1:20 NIV
The Holy Spirit revealed to the disciples the connections such as these to the old testament. I don’t think this is something that they grew up being taught from the priests. I also don’t think Peter would have made this connection on his own. But as we will see the disciples did not get it all right we wont either. We must remember that everything that God has revealed through the writters of the bible is complete. There is no new revelation. But He still speaks to us through His word in the power of the Holy Spirit. Sometimes the hard part is knowing what to do with the information and when.