Because that requires that you know how long the list is. If you know $list_of_ids will always have 5 elements you can use
where id in (:id_1, :id_2, :id_3, :id_4, :id_5)