Confusion about various possible definitions of open sets I have read a simple article about open sets and compactness:
https://www.math3ma.com/blog/open-sets-are-everything
Basically, it says that when we change the way we define open sets on a space, we can also influence its compactness this way. E.g. $\mathbb{R}$ with open sets defined the usual way is noncompact. But when open sets are defined as complements of finite sets, $\mathbb{R}$ becomes compact with this topology.
I still cannot grasp this idea. Since compactness and openness of sets are needed for some mathematical concepts, how can we simply decide that "open set" is something different? Do we always arbitrary expect the open sets to be defined the obvious way, if not stating otherwise? And are there even any restriction on how we CAN define the open sets to make it okay for performing calculus on the space etc?
 A: 
Since compactness and openness of sets are needed for some mathematical concepts, how can we simply decide that "open set" is something different?

There's a misunderstanding: neither compactness nor openness is a property of a set. In fact given a set $X$ we define what subsets are open (they have to obey topology axioms) on that set. If you see someone stating that, say "$(0,1)$ is open in $\mathbb{R}$" then he is implicitly assuming the Euclidean topology on $\mathbb{R}$. You always start with topology (meaning the collection of all open subsets on a given set).
Now compactness is a property of a particular topology. So you first start with open sets and then you can conclude whether the space is compact or not. If we change open subset then other properties (compactness, connectedness, etc.) may change as well.
Also we can do whatever we want in maths. We defined what "open sets", or more precisely "topology", means. And then given a set $X$ we can consider different topologies on that set. We can create them however we want, there's nothing that can stop us. And then we can analyze properties of such spaces like compactness.
For example $\mathbb{R}$ can be given multiple different topologies:

*

*the Euclidean topology (i.e. a subset is open if it is a union of open intervals1 $(a,b)$)

*the discrete topology: all subsets are open

*the antidiscrete topology: only $\emptyset$ and $\mathbb{R}$ are open

*the cofinite topology: complements of finite subsets are open

*the lower limit topology: based on intervals of the form $[a,b)$

*...

and so on, and so on, in fact infinitely many. We then ask what properties each of these spaces has? Is it compact? Connected? Etc. For example 1. is connected but not compact, 2. is neither compact not connected, 3. is compact and connected, and so is 4.
For a given (logically valid) combination of topological properties, you will probably find a topology on $\mathbb{R}$ which satisfies them.

Do we always arbitrary expect the open sets to be defined the obvious way, if not stating otherwise?

In some cases yes. For example consider the set of all real numbers $\mathbb{R}$. Typically when topology is not explicitly defined then the Euclidean topology is assumed.
Analogously $\mathbb{R}^n$ (and its subsets), is typically considered with the product topology (respectively subspace topology) based on the Euclidean $\mathbb{R}$. Unless explicitly stated otherwise.
But when dealing with non standard sets, some general $X$, then it is expected from the author to clearly state what topology he is considering. Otherwise it may lead to confusion.

And are there even any restriction on how we CAN define the open sets to make it okay for performing calculus on the space etc?

That's the other way around. We don't start with calculus and then define open subsets. We start with open subsets and slowly build entire calculus machinery. For example convergence is meaningless without open subsets (I mean it can be defined via metric/norm but these are equivalent). And convergence is necessary for derivative definition. Not only that, but we also need subtraction and division, and it would be good if those were to behave nicely (i.e. continuous). Other properties of the Euclidean $\mathbb{R}$ are also of great importance for the calculus, e.g. local compactness, completeness of the Euclidean metric, path connectedness, etc.
On the other hand general topology is not enough to perform differential calculus. Differential calculus is based on $\mathbb{R}$ with the standard Euclidean topology. It can be performed on other spaces ($\mathbb{R}^n$, manifolds, Banach spaces, etc.) but all of those are heavily related to the standard $\mathbb{R}$. There's simply something very special about $\mathbb{R}$ (with the Euclidean topology) making it a very rich and useful structure.
Of course this is not 100% accurate. Some abstract forms of calculus (e.g. derivations) can be done without $\mathbb{R}$ and on other nontopological (e.g. purely algebraic) structures, but lets just assume that these are not mainstream maths. There are also other approaches, e.g. p-adic analysis, see this post: Can we define a derivative on the $p$-adic numbers?

Footnotes:

*

*Note that there's a confusing terminology: "open" in "open interval" does not refer to topology. That would be a circular reference. An "open interval" $(a,b)$ is actually a well defined set regardless of topology: $(a,b):=\{x\in\mathbb{R}\ |\ a<x<b\}$. In particular an open interval need not be open in some non-Euclidean topology.

A: You have to carefully differentiate between sets and topological spaces. A priori, the elements of a set have no relation to each other whatsoever, be that geometric, algebraic, or whatever. You can imagine a set as a bag containing all of its elements, but without giving them any structure. The set $\mathbb R$ is not a line. It's just a collection of numbers without order, algebraic relations, or whatever. The number line $\mathbb R$ is not just a set. Its elements have a precisely defined position on a line, they are ordered, and we can pinpoint features like there always being an element between any two other elements, and similar things. All this structure is not part of the set $\mathbb R$. But it is part of the topological space $\mathbb R$ - as long as we're talking about the standard topology. But there's nothing about the set that would force us to give it the "standard" structure. We aren't forced to align the real numbers in a line. We could order them alphabetically, such that three is between one and two. Or we could just make an infinite number of piles out of them, where each pile contains only numbers which round to the same integer (so 2.7 and $\pi$ go on the same pile). And these different topological spaces would definitely not look the same way as the standard topological space. That's what you need to realize about topology: it's the topology that gives a set its shape. Without a topology, sets are just disorganized bags of objects. The specific structure we imagine when thinking about the real line is not a structure of the set, but a feature of one specific possible topology on that set. Other topologies are possible, and those topologies should not be imagined as a line.
The usefulness of other topologies is another question, though. You could certainly say that imagining the reals arrayed in a line is very often very useful! There's a reason why that's the standard topology. But in some situations it's just better to be flexible and to let go of the usual structure.
