There are two ways of granting access to an object to every single profile in organization.
In this post I will describe the first possible way which is useful for Salesforce Administrators since this way doesn’t need to write any code.
This is the way suggested by Guy here and Himanshu Parashar in topic on developer forums.
1. Check if you have Enhanced Profile List View Feature enabled. For this, go to Setup\Customize\User Interface under Setup header
2. Then go to Profile List View and Create a new View and add CRUD permissions for the object you need. You need to input the object name into search edit box and select all six CRUD setting for given object and click add button to include them in selected settings and then click save to save the view.
3. Then you need to check ‘Select All’ checkbox on the topmost-left corner of the view, then check “Modify All” and “Create”. For each setting you need to select “All selected records” radio option and hit save.
And then access should be granted to all profiles. Note then for some profiles checkbox may still be unchecked, these are standard profiles and we can’t modify those options.