The unrelated idea attached to a bill is called a "rider".
A rider is an attachment, schedule, amendment, or other writing that is annexed (added) to a document in order to modify it.
The U.S. Congress is the legislative branch of the federal government and makes laws for the nation. Congress has two legislative bodies (houses): the U.S. Senate and the U.S. House of Representatives. Anyone elected to either body can propose a new law. Proposals for new laws are called bills.
Learn how laws, regulations, and executive orders are made and how to look them up at USA.gov.