All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
The draw which you mentioned is fair in the situation which you mentioned in the question. Buying the house is in principle a right for all the applicants, but since it is not possible to meet all their demands, then it is justice to carry out a draw, because the right can only be confirmed for some of them and it is only by a draw that these indefinite people can be selected.
Therefore, the person who pays bribery to the people in charge is considered as spending his money in what he can only get by a draw, and whoever spends his money in order to get what he has no right in getting is sinful. In case he pays bribery and he does not get what he wants, and pays again for the second time, then he commits a greater sin as he tried to get to what is forbidden more than once.
As regards the issue of buying the house from a person who obtained it through bribery, then it appears, and Allaah Knows best, that this is not permissible because the seller is selling something which he did not own legally. The draw is for selecting a person among all the applicants, therefore, whoever transgresses this method [draw] in one way or another, then he has taken the right of others, and if he sells it he sells something that he does not own, and the Prophet : "Do not sell what you do not own." [Ahmad]; which means what you did not legally possess. Therefore, it is not permissible for you to buy the house from whoever obtained it in this way.
Allaah Knows best.