Actually it is legal to buy tobacco products from a vending machine in many states. The restriction is that they can only be in places that check ID to get in like bars. Of course laws vary by state.
As far as cannabis vending goes, cannabis can only be sold at dispensaries in all states where it is legal and that is not going to change any time in the foreseeable future. The argument that a vending machine in a dispensary could cut down on lines is a valid one but so far AG has not reported any significant revenue from vending machine sales in their financials and that is not going to change in the foreseeable future either.