Having freedom of speech, or any other freedom does not mean freedom from consequences.
For example you have the freedom of speech to call your boss an asshole, your boss has the freedom of association to end your association with his/her business aka fire your ass.
Your boss can not violate your freedom of speech by preventing you from speaking in the manner you choose, but you can not violate your bosses freedom of association by forcing him/her to providing you with a job...
In the case of the fork bomb, that is neither a Freedom of Speech or Freedom of Association issue,
Employees in most business are required to treat company property with respect and care for BUSINESS PURPOSES ONLY, launching a fork bomb has no business value and is thus using company resources in a non-business purpose which is prohibited. Just like running a bit coin miner would be a firing offense.