Money obviously has something to do with it, but it doesn't explain the apparent lack of judgement involved.
If your next door neighbor broke into your house, attacked you, stole half your stuff, and threatened to kill you, and then asked you to sell him your gun, would you do it?
The SIPRI data is from the State Service of Export Control of Ukraine:
	
	
		
			
			
				
				
				
					
						
							
						
					
					www.sipri.org
				
 
			 
		 
	 
In other words, it appears to me the sales were being done with the knowledge of the Ukraine government despite the embargo that was put in place after Russia annexed Crimea.
It's entirely possible to ban exports of weapons to certain countries. The U.S. government does it. Here's an example:
>>>(l) Russia. It is the policy of the United States to deny licenses or 
other approvals for exports of defense articles and defense services destined for Russia, except that a license or  
other approval may be issued, on a case-by-case basis:
(1) For government space cooperation; and
(2) Prior to September 1, 2021, for commercial space launches.<<<
	
	
		
			
				
			
			
				
				
				
					
						
							
						
					
					www.law.cornell.edu
				
 
			 
		 
	 
Penalties include fines and imprisonment:
https://www.ecfr.gov/current/title-22/chapter-I/subchapter-M/part-127
The existence of amoral corporations does not inevitably lead to large exports of weapons to Russia (the original article I posted states that after the annexation of Crimea Russia remained the 
second biggest market for weapons exports from Ukraine)