Lottery Lacag vs Ceyr cash

I understand playing the lottery is in itself forbidden and the money gained from is haram

“O you who believe! Intoxicants (all kinds of alcoholic drinks), and gambling, and Al‑Ansaab (stone altars for sacrifices to idols etc), and Al‑Azlaam (arrows for seeking luck or decision) are an abomination of Shaytaan’s (Satan’s) handiwork. So avoid (strictly all) that (abomination) in order that you may be successful.

91. Shaytaan (Satan) wants only to excite enmity and hatred between you with intoxicants (alcoholic drinks) and gambling, and hinder you from the remembrance of Allaah and from As‑Salaah (the prayer). So, will you not then abstain?”

Al-Maa’idah 5:90-91

laakiin why isn't Ceyr money treated as haram lacag cuz the government collects taxes from banks who deal in interest (which is haram) according to this site

"The banking sector contributed £35.4 billion in UK taxes in 2016/17, according to analysis by PwC."

Also taxes from alcohol companies, tobaaco companies, companies who sell pork and non halal meat, weapons manufacturers, hotels, night clubs, strip clubs and all other haram businesses so wouldn't taking ceyr mean one's consuming haram money?

Finally, according to this site if the person is in need of the haram money he may take "as much as he needs and give the rest in charity" although I'm a bit suspicious about that idea and would not feel comfortable spending haram money on things
I think you are looking too deep.
Regarding najasah, it is determined by that which meets the eye( yudrik al'ayn) ofcourse if you use microscopes you will finds trace of the najasah evrn after rigorous washing. The goal is 99 percent certainty level, when things are small enough they are called forgiven('afwah), out of the kindness of God.
I always assumed it was because I thought the government collects taxes from all these haram businesses and therefore it must be haram.
It is haraam for you to directly benefit from these like accepting interest based loans, making money from betting and alcohol but not when someone else(government) accepts the cash then gives it to you.

Same way you ain't responsible for theft if a thief steals from someone then spends their money in a shop you own.
Whatever money you earn halal is halal. Like the person above said, it’s only haram if you directly benefit from it, otherwise everything would be haram!

welfare money is halal if you are in need of it and don’t commit fraud.